- Replace fixed 1s RunDaemon timer with event-driven select loop using
separate log (3s) and state (5s) tickers for periodic flush
- Add batch-size threshold (default 100 rows) to flush logs immediately
during bursty output like npm install
- Add max-latency timer (default 5s) to guarantee single log lines are
delivered within a bounded time
- Trigger immediate flush on step transitions (start/stop) and job
result for responsive frontend UX
- Skip ReportLog when no pending rows and ReportState when state is
unchanged to eliminate no-op HTTP requests
- Replace fixed-rate polling with exponential backoff and jitter to
prevent thundering herd on idle runners
- Tune HTTP client with MaxIdleConnsPerHost=10 and share a single
http.Client between Ping and Runner service clients
- Add configurable options: log_report_interval, log_report_max_latency,
log_report_batch_size, state_report_interval, fetch_interval_max
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Removed `deadcode`, `structcheck`, and `varcheck` linters from `.golangci.yml`
- Fixed a typo in a comment in `daemon.go`
- Renamed `defaultActionsUrl` to `defaultActionsURL` in `exec.go`
- Removed unnecessary else clause in `exec.go` and `runner.go`
- Simplified variable initialization in `exec.go`
- Changed function name from `getHttpClient` to `getHTTPClient` in `http.go`
- Removed unnecessary else clause in `labels_test.go`
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/289
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>