Commit 7991b0449920b0c90bd7c529bbb2e5b1699a87ef

Authored by Jacob Vosmaer
1 parent 2128419c

Remove duplicate log path generation

Showing 1 changed file with 6 additions and 2 deletions   Show diff stats
lib/tasks/sidekiq.rake
... ... @@ -14,15 +14,19 @@ namespace :sidekiq do
14 14 Rake::Task['sidekiq:stop'].invoke
15 15 puts 'Starting new sidekiq process.'
16 16 end
17   - 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 &"
  17 + 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 &"
18 18 end
19 19  
20 20 desc "GITLAB | Start sidekiq with launchd on Mac OS X"
21 21 task :launchd do
22   - 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"
  22 + 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"
23 23 end
24 24  
25 25 def pidfile
26 26 Rails.root.join("tmp", "pids", "sidekiq.pid")
27 27 end
  28 +
  29 + def log_file
  30 + Rails.root.join("log", "sidekiq.log")
  31 + end
28 32 end
... ...