feat: add Runner.ShutdownTimeout config option

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.
This commit is contained in:
Rowan Bohde
2024-05-23 11:19:08 -05:00
parent 96b9b922cd
commit 0d79479484
4 changed files with 37 additions and 13 deletions

View File

@@ -23,6 +23,9 @@ runner:
# Please note that the Gitea instance also has a timeout (3h by default) for the job.
# So the job could be stopped by the Gitea instance if it's timeout is shorter than this.
timeout: 3h
# The timeout for the runner to wait for running jobs to finish when shutting down.
# Any running jobs that haven't finished after this timeout will be cancelled.
shutdown_timeout: 0s
# Whether skip verifying the TLS certificate of the Gitea instance.
insecure: false
# The timeout for fetching the job from the Gitea instance.