feat: allow graceful shutdowns #546

Merged
lunny merged 3 commits from rowan-allspice/act_runner:graceful-shutdown into main 2024-05-27 07:38:56 +00:00

3 Commits

Author SHA1 Message Date
Rowan Bohde
0d79479484 feat: add Runner.ShutdownTimeout config option
All checks were successful
checks / check and test (pull_request) Successful in 55s
This controls the amount of time the runner will wait for running jobs
to finish before cancelling them. Defaults to 0s in order to maintain
backwards compatibility with previous behavior.
2024-05-23 11:20:42 -05:00
Rowan Bohde
96b9b922cd fix: exec act_runner
All checks were successful
checks / check and test (pull_request) Successful in 27s
This passes signals for graceful shutdown.
2024-05-17 12:22:36 -05:00
Rowan Bohde
b350719527 feat: allow graceful shutdowns
All checks were successful
checks / check and test (pull_request) Successful in 1m0s
Add a Shutdown(context.Context) method to the Poller. This will first
shutdown all active polling, preventing any new jobs from spawning. It
will then wait for either all jobs to finish, or for the context to
finish. If the context finishes, it will then force all jobs to end,
and then exit.
2024-05-13 15:13:09 -05:00