-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide job timeouts #65
Labels
Milestone
Comments
This was referenced Nov 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clients will want a way to set timeouts on jobs. The most obvious use case is for test frameworks, but it's a generally useful feature.
We could implement this using per-job tracking (#64) and per-job cancelation (#63), but implementing those two features just to support timeouts seems like a more work than is necessary. Also, it would put the burden on the client, meaning we'd have to re-implement cancelation in every client library (in multiple languages, for example). Plus, it wouldn't be the simplest thing to implement on the client since a job may be started, the maybe the worker goes away, and the job gets restarted on a different worker, and then maybe the job gets pre-empted, etc. The client would have to be pretty sophisticated about tracking the various states the job could be in.
I imagine this would be an
Option<Duration>
in theJobDetails
. We'd probably add another variant toJobStatus
forTimedOut
, or we'd do something equivalent. The worker would be responsible for implementing the timeout. It would start the timer ticking when it actually started executing the job.The text was updated successfully, but these errors were encountered: