Sha256: 8ff5f48cfb2062a3e722a108df95f15d585fefe9019c7429921a088ef171659b

Contents?: true

Size: 511 Bytes

Versions: 25

Compression:

Stored size: 511 Bytes

Contents

# bundle exec rake sidekiq:start
# bundle exec rake sidekiq:clear

namespace :sidekiq do
  desc 'Starts the sidekiq background job server'
  task :start do
    system('bundle exec sidekiq -C config/sidekiq.yml')
  end

  desc 'Clears all in progress sidekiq jobs'
  task clear: :environment do
    unless Rails.env.development?
      puts "Cannot run in non-development mode"; exit
    end

    require 'sidekiq/api'
    Sidekiq::Queue.all.each { |q| q.clear }

    puts "All sidekiq queues cleared"
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
effective_developer-0.6.12 lib/tasks/sidekiq_clear.rake
effective_developer-0.6.11 lib/tasks/sidekiq_clear.rake
effective_developer-0.6.10 lib/tasks/sidekiq_clear.rake
effective_developer-0.6.9 lib/tasks/sidekiq_clear.rake
effective_developer-0.6.8 lib/tasks/sidekiq_clear.rake