Commit 4eac403e authored by Riyad Preukschas's avatar Riyad Preukschas

Fix sidekiq task to use Rails

parent 6ea7bc27
...@@ -6,18 +6,10 @@ namespace :sidekiq do ...@@ -6,18 +6,10 @@ namespace :sidekiq do
desc "GITLAB | Start sidekiq" desc "GITLAB | Start sidekiq"
task :start do 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 &" 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 root_path
@root_path ||= File.join(File.expand_path(File.dirname(__FILE__)), "../..")
end end
def pidfile def pidfile
"#{root_path}/tmp/pids/sidekiq.pid" Rails.root.join("tmp", "pids", "sidekiq.pid")
end
def rails_env
ENV['RAILS_ENV'] || "production"
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment