提交 2128419c 编写于 作者: J Jacob Vosmaer

Always shut down sidekiq before starting

上级 7af1bc3b
......@@ -5,7 +5,15 @@ namespace :sidekiq do
end
desc "GITLAB | Start sidekiq"
task :start do
task :start => :restart
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 "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 &"
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册