Class: Webhookdb::Tasks::Sidekiq
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Webhookdb::Tasks::Sidekiq
- Defined in:
- lib/webhookdb/tasks/sidekiq.rb
Instance Method Summary collapse
-
#initialize ⇒ Sidekiq
constructor
A new instance of Sidekiq.
Constructor Details
#initialize ⇒ Sidekiq
Returns a new instance of Sidekiq.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/webhookdb/tasks/sidekiq.rb', line 9 def initialize super() namespace :sidekiq do desc "Clear the Sidekiq redis DB (flushdb). " \ "Only use on local, and only for legit reasons, " \ "not to paper over problems that will show on staging and prod " \ "(like removing a job class)." task :reset do require "webhookdb/async" ::Sidekiq.redis(&:flushdb) end end end |