resque / resque/resque-scheduler

Cleaning up the scheduled jobs

Open
#458 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
1.7k
Forks
477
PR merge metrics
No merged PRs in 30d

Description

Hello all -

I have a question regarding how the scheduled jobs are clean up from redis. I was looking at this code: https://github.com/resque/resque-scheduler/blob/6e86834e9ff35fb9e976ab79176b650f19385562/lib/resque/scheduler/delaying_extensions.rb#L114

I'm seeing some huge discrepancies in redis between the size of resque:delayed_queue_schedule and the amount of "resque:delayed:1419022315" and "resque:timestamps:.." .

I was thinking if it possible that some jobs didn't get clean properly. What happens if an exception is thrown in this part of the code?

Is there a way to clean up timestamps that are older than x ?

Contributor guide

Open the contributing guide

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 with lib/resque/scheduler/delaying_extensions.rb around line 114 and inspect how scheduled jobs and timestamps are removed from Redis, including exception handling. Compare resque:delayed_queue_schedule with the resque:delayed:* and resque:timestamps:* keys described in the issue. Done would require an agreed cleanup behavior for stale timestamps and a clear way to verify it.

Written by the indexing model from the issue text.

Assessment

Tech stack
redis, ruby
Domain
backend, databases
Issue type
Bug
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.