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.8.5 lib/tasks/sidekiq_clear.rake
effective_developer-0.8.4 lib/tasks/sidekiq_clear.rake
effective_developer-0.8.3 lib/tasks/sidekiq_clear.rake
effective_developer-0.8.2 lib/tasks/sidekiq_clear.rake
effective_developer-0.8.1 lib/tasks/sidekiq_clear.rake
effective_developer-0.8.0 lib/tasks/sidekiq_clear.rake
effective_developer-0.7.8 lib/tasks/sidekiq_clear.rake
effective_developer-0.7.7 lib/tasks/sidekiq_clear.rake
effective_developer-0.7.6 lib/tasks/sidekiq_clear.rake
effective_developer-0.7.5 lib/tasks/sidekiq_clear.rake
effective_developer-0.7.4 lib/tasks/sidekiq_clear.rake
effective_developer-0.7.3 lib/tasks/sidekiq_clear.rake
effective_developer-0.7.2 lib/tasks/sidekiq_clear.rake
effective_developer-0.7.1 lib/tasks/sidekiq_clear.rake
effective_developer-0.7.0 lib/tasks/sidekiq_clear.rake
effective_developer-0.6.17 lib/tasks/sidekiq_clear.rake
effective_developer-0.6.16 lib/tasks/sidekiq_clear.rake
effective_developer-0.6.15 lib/tasks/sidekiq_clear.rake
effective_developer-0.6.14 lib/tasks/sidekiq_clear.rake
effective_developer-0.6.13 lib/tasks/sidekiq_clear.rake