rq / rq-scheduler

A lightweight library that adds job scheduling capabilities to RQ (Redis Queue)
MIT License
1.45k stars 229 forks source link

Schedule table should contain jobs definition #230

Open marcinn opened 4 years ago

marcinn commented 4 years ago

Hi.

The schedule contains only references to jobs. Calling rq empty destroys jobs metadata (and the schedule itself), and only rq:scheduler:scheduled_jobs still contains (outdated) job ids. If someone is calling rq empty <queue_name>, he's intention is to remove queued jobs, but not destroy the schedule.

I'd suggest to redesign a storage of the schedule and store entries outside job queues.