About running the job only one time on restart
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 630
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
If I stop my application and restart it after some time (using the same queue names), it will execute the jobs as many times as it should have run if my application didn't stop. Is there a way to make it execute only one time?
From what I got in the lua script, it adds the frequency in the job score when popping it, so I guess I could achieve what I want by setting all the existing job scores as the current time when the application starts. But I wanted to know if there is a solution for that already, or some other idea, because it looks hackish.
The delayed job, if I understand correctly, don't fit well since I need to re-add the job after it runs, and I guess I could lose a job if my application stopped in the middle of the process.
Contributor guide
No contributing guide indexed for this repository
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 reviewing the Lua script that updates job scores when jobs are popped, along with the existing queue and delayed-job behavior described in the issue. Reproduce a stop-and-restart scenario using the same queue names, then define and test the expected single-execution behavior; the issue does not name a source file or existing test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100