sidekiq.rake 728 字节
Newer Older
1 2 3 4 5 6 7 8
namespace :sidekiq do
  desc "GITLAB | Stop sidekiq"
  task :stop do
    run "bundle exec sidekiqctl stop #{pidfile}"
  end

  desc "GITLAB | Start sidekiq"
  task :start do
9
    run "nohup bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} >> #{Rails.root.join("log", "sidekiq.log")} 2>&1 &"
10
  end
M
Michael Lee 已提交
11 12 13 14 15 16
  
  desc "GITLAB | Start sidekiq with launchd on Mac OS X"
  task :launchd do
    run "bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} >> #{Rails.root.join("log", "sidekiq.log")} 2>&1"
  end
  
17
  def pidfile
R
Riyad Preukschas 已提交
18
    Rails.root.join("tmp", "pids", "sidekiq.pid")
19 20
  end
end