gresrun / gresrun/jesque

About running the job only one time on restart

Open
#111 3 comments 1 reaction 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.