diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-09 23:56:47 +0100 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-10 00:09:09 +0100 |
commit | 4eac403e3b3a32188c48d006e431ee838cd5c3dc (patch) | |
tree | 3efa8404828aba2c3434742f40b22280917bf6f3 /lib/tasks/sidekiq.rake | |
parent | 6ea7bc27e4d143acbabf9fef2a95a7cc0ba997b7 (diff) | |
download | gitlab-ce-4eac403e3b3a32188c48d006e431ee838cd5c3dc.tar.gz |
Fix sidekiq task to use Rails
Diffstat (limited to 'lib/tasks/sidekiq.rake')
-rw-r--r-- | lib/tasks/sidekiq.rake | 12 |
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 |