allow disabling periodic jobs
Change-Id: I106957c66c6afa9a1239833dfc8ec517e488cb61 Reviewed-on: https://gerrit.instructure.com/3734 Reviewed-by: Zach Wily <zach@instructure.com> Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
parent
2025f70f70
commit
6a77616865
|
@ -9,9 +9,13 @@ production:
|
|||
# if set, workers will process this many jobs and then die, causing the pool
|
||||
# to spawn another worker. this can help return memory to the OS.
|
||||
# worker_max_job_count: 20
|
||||
#
|
||||
# if set, workers will die and re-spawn of they exceed this memory usage
|
||||
# threshold. they will only die between jobs, not during a job.
|
||||
# worker_max_memory_usage: 1073741824
|
||||
#
|
||||
# disable periodic jobs auditor -- this isn't normally necessary
|
||||
# disable_periodic_jobs: true
|
||||
|
||||
default:
|
||||
workers:
|
||||
|
|
|
@ -121,6 +121,8 @@ class Pool
|
|||
end
|
||||
|
||||
def spawn_periodic_auditor
|
||||
return if @config[:disable_periodic_jobs]
|
||||
|
||||
@periodic_thread = Thread.new do
|
||||
# schedule the initial audit immediately on startup
|
||||
schedule_periodic_audit
|
||||
|
|
Loading…
Reference in New Issue