feat: add scheduling timeout (non-configurable) #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #10 and #11
Adds a non-configurable scheduling timeout of 30 seconds. This can be made configurable in the step declaration eventually.
A quick note on active versus passive scheduling:
ticker
service. This service currently handles job run timeouts and step run timeouts, but does not handle requeueing or scheduling timeouts.The proper way to do this is to schedule all timeouts with the ticker for active listening, and passively query all timeouts as a fallback if a ticker goes down. The passive interval sets the error boundaries on the timing - for example, +5 seconds for requeueing timeouts. This means that if a ticker unexpectedly fails or goes down, the passive scheduler can still cancel jobs and step runs within the error boundary. Smaller error boundaries mean more database load.
A future PR will make all timeouts both passive and active, but at the moment requeueing and scheduling timeouts are passive while job run and step run timeouts are active.