Sha256: a2287df71ff1484bcedbc7ae68d870689b1b5ec91d06d1d3654711c3cd69b39e

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

namespace :sidekiq do

  desc 'Starts Sidekiq'
  task start: [:environment] do
    cmd = Cocaine::CommandLine.new('bundle exec sidekiq', '-C config/sidekiq.yml')
    mes = cmd.run
    if mes == ''
      puts 'Sidekiq started successfully.'
    else
      mes
    end
  end

  desc 'Stops Sidekiq'
  task stop: [:environment] do
    cmd = Cocaine::CommandLine.new('sidekiqctl', 'stop tmp/pids/sidekiq.pid')
    puts cmd.run
  end

  desc 'Restarts Sidekiq'
  task restart: [:environment] do
    Rake::Task['sidekiq:stop'].execute
    Rake::Task['sidekiq:start'].execute
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cybele-1.9.2 templates/lib/tasks/sidekiq.rake
cybele-1.9.1 templates/lib/tasks/sidekiq.rake
cybele-1.9.0 templates/lib/tasks/sidekiq.rake