Commit aceb747bb87319c4118ce60fe9c221e54068ba31

Authored by Dmitriy Zaporozhets
1 parent 92039dd6

use system call to start sidekiq

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
lib/tasks/sidekiq.rake
1 namespace :sidekiq do 1 namespace :sidekiq do
2 desc "GITLAB | Stop sidekiq" 2 desc "GITLAB | Stop sidekiq"
3 task :stop do 3 task :stop do
4 - run "bundle exec sidekiqctl stop #{pidfile}" 4 + system "bundle exec sidekiqctl stop #{pidfile}"
5 end 5 end
6 6
7 desc "GITLAB | Start sidekiq" 7 desc "GITLAB | Start sidekiq"
8 task :start do 8 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 &" 9 + system "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 10 end
11 - 11 +
12 desc "GITLAB | Start sidekiq with launchd on Mac OS X" 12 desc "GITLAB | Start sidekiq with launchd on Mac OS X"
13 task :launchd do 13 task :launchd do
14 - 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" 14 + system "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"
15 end 15 end
16 - 16 +
17 def pidfile 17 def pidfile
18 Rails.root.join("tmp", "pids", "sidekiq.pid") 18 Rails.root.join("tmp", "pids", "sidekiq.pid")
19 end 19 end