summaryrefslogtreecommitdiff
path: root/lib/tasks/sidekiq.rake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/sidekiq.rake')
-rw-r--r--lib/tasks/sidekiq.rake12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/tasks/sidekiq.rake b/lib/tasks/sidekiq.rake
index 6bbcb3da4bc..01da919d7f8 100644
--- a/lib/tasks/sidekiq.rake
+++ b/lib/tasks/sidekiq.rake
@@ -6,18 +6,10 @@ namespace :sidekiq do
desc "GITLAB | Start sidekiq"
task :start do
- run "nohup bundle exec sidekiq -q post_receive,mailer,system_hook,common,default -e #{rails_env} -P #{pidfile} >> #{root_path}/log/sidekiq.log 2>&1 &"
- end
-
- def root_path
- @root_path ||= File.join(File.expand_path(File.dirname(__FILE__)), "../..")
+ run "nohup bundle exec sidekiq -q post_receive,mailer,system_hook,common,default -e #{Rails.env} -P #{pidfile} >> #{Rails.root.join("log", "sidekiq.log")} 2>&1 &"
end
def pidfile
- "#{root_path}/tmp/pids/sidekiq.pid"
- end
-
- def rails_env
- ENV['RAILS_ENV'] || "production"
+ Rails.root.join("tmp", "pids", "sidekiq.pid")
end
end