summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-01-29 14:50:14 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-01-29 14:50:14 +0100
commitbd9c70b1dd27fd928e7e3f29bd14833bcb94b4c2 (patch)
treedcbf58a464aa1a8b001a9aa0157d697723c15a4a /lib
parent609f226a281c1ec8319b1259835703eb6d96d3cf (diff)
downloadgitlab-ci-bd9c70b1dd27fd928e7e3f29bd14833bcb94b4c2.tar.gz
Remove duplication in sidekiq.rake
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/sidekiq.rake8
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