Faster restore of containers after puma restart

This commit is contained in:
Jan Renz
2015-11-23 20:13:59 +01:00
parent d262e194c1
commit c41a8d8d5e
2 changed files with 3 additions and 3 deletions

View File

@ -18,8 +18,8 @@ production:
active: true active: true
refill: refill:
async: false async: false
batch_size: 32 batch_size: 8
interval: 30 interval: 15
timeout: 60 timeout: 60
workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %> workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %>
ws_host: ws://localhost:4243 ws_host: ws://localhost:4243

View File

@ -96,7 +96,7 @@ class DockerContainerPool
end end
def self.start_refill_task def self.start_refill_task
@refill_task = Concurrent::TimerTask.new(execution_interval: config[:refill][:interval], run_now: false, timeout_interval: config[:refill][:timeout]) { refill } @refill_task = Concurrent::TimerTask.new(execution_interval: config[:refill][:interval], run_now: true, timeout_interval: config[:refill][:timeout]) { refill }
@refill_task.execute @refill_task.execute
end end
end end