You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to schedule the main jobs in the default queue, But secondary jobs in another queue called "systemTriggers". The Job is scheduled in the second queue. when i cancel jobs in "systemTriggers" all jobs of default queue are also cancelled.
Here is how im doing this:
scheduler = Scheduler("systemTriggers",connection=Redis())
allJobs=scheduler.get_jobs()
for job in allJobs:
scheduler.cancel(job)
scheduler.scheduler(newJob) # this is to avoid duplication whenever my django reloads as this is startup code
Thanks!
The text was updated successfully, but these errors were encountered:
I'm facing the same issue. My workaround is to filter jobs by the queue_name stored in the origin property. Here's how it would work using @munzzz5 example:
scheduler = Scheduler("systemTriggers",connection=Redis())
allJobs=scheduler.get_jobs()
for job in allJobs:
if job.origin == "systemTriggers": # check that the job is from the desired queue
scheduler.cancel(job)
scheduler.scheduler(newJob)
I am trying to schedule the main jobs in the default queue, But secondary jobs in another queue called "systemTriggers". The Job is scheduled in the second queue. when i cancel jobs in "systemTriggers" all jobs of default queue are also cancelled.
Here is how im doing this:
Thanks!
The text was updated successfully, but these errors were encountered: