Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-09 18:45:32 +0400
committerJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-16 00:48:57 +0400
commit6a7d63aa47d583a21b87b623a010d8b98abb8777 (patch)
tree682fd8e0bb7314a82339da69be6442cb1e037971 /lib/tasks/sidekiq.rake
parent7c4db532ff246a9831a5decaaf031affeb1eb21d (diff)
Move unicorn and sidekiq commands into bash script
Diffstat (limited to 'lib/tasks/sidekiq.rake')
-rw-r--r--lib/tasks/sidekiq.rake27
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