Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-09 17:46:00 +0400
committerJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-09 17:51:39 +0400
commit7991b0449920b0c90bd7c529bbb2e5b1699a87ef (patch)
treee86952f4e0c3f2dfe44b093b1b155ae56b36e4f2 /lib/tasks/sidekiq.rake
parent2128419c5b42905a20e2d459fa11c8e4680ed58f (diff)
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