2

I'm using Sidetiq and Sidekiq together to recurring jobs :

 include Sidekiq::Worker
 include Sidetiq::Schedulable

 recurrence { secondly(3) }

 def perform(id,last_occurrence)
    # magic happens
 end

However, now I want to stop the entire enqueuing process. I want to remove all the process from Sidetiq. How can I do?

infused
  • 24,000
  • 13
  • 68
  • 78
Hoseong Son
  • 247
  • 4
  • 18

1 Answers1

2

Kind of late on this it looks like, but here we go anywho.

You can delete all scheduled sidetiq process like this:

Sidetiq::scheduled.each { |occurrence| occurrence.delete }

As far as preventing sidetiq from queuing additional jobs, i'm not sure how that works or how to dynamically stop it.

Brad Decker
  • 746
  • 8
  • 20