Skip to content
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

Closed
nfachan opened this issue Nov 10, 2023 · 0 comments
Closed

Provide job timeouts #65

nfachan opened this issue Nov 10, 2023 · 0 comments

Comments

@nfachan
Copy link
Collaborator

nfachan commented Nov 10, 2023

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 the JobDetails. We'd probably add another variant to JobStatus for TimedOut, 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.

@nfachan nfachan added the job label Nov 10, 2023
@nfachan nfachan added this to the Launch milestone Dec 1, 2023
@nfachan nfachan modified the milestones: Launch, 0.4.0, Someday Jan 11, 2024
@nfachan nfachan modified the milestones: Someday, 0.6.0 Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant