Small improvement for logging.
This commit is contained in:
parent
d5161405c0
commit
9220ad1008
2 changed files with 3 additions and 3 deletions
|
@ -195,7 +195,7 @@ class Scheduler < ApplicationModel
|
||||||
if try_run_max > try_count
|
if try_run_max > try_count
|
||||||
_start_job(job, try_count, try_run_time)
|
_start_job(job, try_count, try_run_time)
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ def after_fork(dir)
|
||||||
file.sync = true
|
file.sync = true
|
||||||
end
|
end
|
||||||
|
|
||||||
$stdout.reopen( "#{dir}/log/scheduler_out.log", 'w')
|
$stdout.reopen("#{dir}/log/scheduler_out.log", 'w')
|
||||||
$stderr.reopen( "#{dir}/log/scheduler_err.log", 'w')
|
$stderr.reopen("#{dir}/log/scheduler_err.log", 'w')
|
||||||
end
|
end
|
||||||
|
|
||||||
before_fork
|
before_fork
|
||||||
|
|
Loading…
Reference in a new issue