summaryrefslogtreecommitdiff
path: root/lib/tasks/sidekiq.rake
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-09 15:46:00 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-09 15:51:39 +0200
commit7991b0449920b0c90bd7c529bbb2e5b1699a87ef (patch)
treee86952f4e0c3f2dfe44b093b1b155ae56b36e4f2 /lib/tasks/sidekiq.rake
parent2128419c5b42905a20e2d459fa11c8e4680ed58f (diff)
downloadgitlab-ce-7991b0449920b0c90bd7c529bbb2e5b1699a87ef.tar.gz
Remove duplicate log path generation
Diffstat (limited to 'lib/tasks/sidekiq.rake')
-rw-r--r--lib/tasks/sidekiq.rake8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/tasks/sidekiq.rake b/lib/tasks/sidekiq.rake
index e71cf0380ed..46caffd0754 100644
--- a/lib/tasks/sidekiq.rake
+++ b/lib/tasks/sidekiq.rake
@@ -14,15 +14,19 @@ namespace :sidekiq do
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 &"
+ system "nohup 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
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} >> #{Rails.root.join("log", "sidekiq.log")} 2>&1"
+ 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")
+ end
end