summaryrefslogtreecommitdiff
path: root/lib/tasks/sidekiq.rake
blob: e4eb0e6776f9637eff3980073d77ab057a73f515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
namespace :sidekiq do
  desc "GITLAB | Stop sidekiq"
  task :stop do
    run "bundle exec sidekiqctl stop #{pidfile}"
  end

  desc "GITLAB | Start sidekiq"
  task :start do
    run "nohup bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitolite,common,default -e #{Rails.env} -P #{pidfile} >> #{Rails.root.join("log", "sidekiq.log")} 2>&1 &"
  end

  def pidfile
    Rails.root.join("tmp", "pids", "sidekiq.pid")
  end
end