Add support for extending TTR
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.1k
- Forks
- 285
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
TTR is a mechanic to release crashed / stalled jobs back into the queue.
Sometimes jobs are slow but not stalled.
Consider the DownloadJob from the docs; I could easily make this job exceed its TTR by throttling the connection at the server.
However since the process is alive and actually doing what it is supposed to do (assuming it is still actually receiving more than 0 b/s) we might want to tell the queue that we're still busy and it shouldn't release our job to someone else just yet.
Beanstalk protocol uses touch for this, and this shouldn't be hard to implement for other drivers.
The database driver currently doesn't do TTR at all (#249). When it does, all we need to do to extend the time is update the reserved_at field.
For other drivers I'm not sure how to implement this exactly, but I don't think it'll be hard.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the DownloadJob example in the documentation and inspecting the queue driver implementations. Compare Beanstalk's touch behavior with the database driver's reserved_at approach and determine how the other drivers should extend TTR. Done means an extension mechanism works consistently across supported drivers without releasing an active job.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100