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.
Hi.
The schedule contains only references to jobs. Calling
rq empty
destroys jobs metadata (and the schedule itself), and onlyrq:scheduler:scheduled_jobs
still contains (outdated) job ids. If someone is callingrq 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.