diff options
Diffstat (limited to 'lib/tasks')
| -rw-r--r-- | lib/tasks/sidekiq.rake | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/lib/tasks/sidekiq.rake b/lib/tasks/sidekiq.rake index ba79b6e035d..23d41f8ed24 100644 --- a/lib/tasks/sidekiq.rake +++ b/lib/tasks/sidekiq.rake @@ -1,32 +1,19 @@ namespace :sidekiq do desc "GITLAB | Stop sidekiq" task :stop do - system "bundle exec sidekiqctl stop #{pidfile}" + system "script/background_jobs stop" end - desc "GITLAB | Start sidekiq" - task :start => :restart + desc "GITLAB | Start sidekiq" do + system "script/background_jobs start" + end - desc 'GitLab | Restart sidekiq' - task :restart do - if File.exist?(pidfile) - puts 'Shutting down existing sidekiq process.' - Rake::Task['sidekiq:stop'].invoke - puts 'Starting new sidekiq process.' - end - system "bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} -d -L #{log_file} >> #{log_file} 2>&1" + desc 'GitLab | Restart sidekiq' do + system "script/background_jobs restart" end desc "GITLAB | Start sidekiq with launchd on Mac OS X" task :launchd do - system "bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e #{Rails.env} -P #{pidfile} >> #{log_file} 2>&1" - end - - def pidfile - Rails.root.join("tmp", "pids", "sidekiq.pid") - end - - def log_file - Rails.root.join("log", "sidekiq.log") + system "script/background_jobs start_no_deamonize" end end |
