diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-01-29 14:50:14 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-01-29 14:50:14 +0100 |
commit | bd9c70b1dd27fd928e7e3f29bd14833bcb94b4c2 (patch) | |
tree | dcbf58a464aa1a8b001a9aa0157d697723c15a4a /lib | |
parent | 609f226a281c1ec8319b1259835703eb6d96d3cf (diff) | |
download | gitlab-ci-bd9c70b1dd27fd928e7e3f29bd14833bcb94b4c2.tar.gz |
Remove duplication in sidekiq.rake
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/sidekiq.rake | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/tasks/sidekiq.rake b/lib/tasks/sidekiq.rake index 44105a8..4d6a7b4 100644 --- a/lib/tasks/sidekiq.rake +++ b/lib/tasks/sidekiq.rake @@ -1,15 +1,11 @@ namespace :sidekiq do desc "GitLab CI | Stop sidekiq" task :stop do - system "bundle exec sidekiqctl stop #{pidfile}" + exec({'RAILS_ENV' => Rails.env}, 'script/background_jobs stop') end desc "GitLab CI | Start sidekiq" task :start do - system "nohup bundle exec sidekiq -q runner,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") + exec({'RAILS_ENV' => Rails.env}, 'script/background_jobs start') end end |