Skip to content

Commit

Permalink
Small improvement for logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
martini committed May 15, 2017
1 parent d516140 commit 9220ad1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def self._start_job(job, try_count = 0, try_run_time = Time.zone.now)
if try_run_max > try_count
_start_job(job, try_count, try_run_time)
else
raise "STOP thread for #{job.method} after #{try_count} tries"
raise "STOP thread for #{job.method} after #{try_count} tries (#{e.inspect})"
end
end

Expand Down
4 changes: 2 additions & 2 deletions script/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def after_fork(dir)
file.sync = true
end

$stdout.reopen( "#{dir}/log/scheduler_out.log", 'w')
$stderr.reopen( "#{dir}/log/scheduler_err.log", 'w')
$stdout.reopen("#{dir}/log/scheduler_out.log", 'w')
$stderr.reopen("#{dir}/log/scheduler_err.log", 'w')
end

before_fork
Expand Down

0 comments on commit 9220ad1

Please sign in to comment.