From a9fa7b6624d8f6a571d82b004728be9a275e5bea Mon Sep 17 00:00:00 2001 From: DuratarskeyK Date: Mon, 4 Feb 2019 19:11:22 +0300 Subject: [PATCH] Increase builder clearing delay to 15 minutes --- app/controllers/api/v1/jobs_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/jobs_controller.rb b/app/controllers/api/v1/jobs_controller.rb index d2464c55b..49ce6785d 100644 --- a/app/controllers/api/v1/jobs_controller.rb +++ b/app/controllers/api/v1/jobs_controller.rb @@ -102,7 +102,7 @@ class Api::V1::JobsController < Api::V1::BaseController def clear_stale_builders BuildList.transaction do - BuildList.where(["updated_at < ?", 120.seconds.ago]).where(status: BuildList::BUILD_PENDING).where.not(builder: nil).find_each(batch_size: 50) do |bl| + BuildList.where(["updated_at < ?", 900.seconds.ago]).where(status: BuildList::BUILD_PENDING).where.not(builder: nil).find_each(batch_size: 50) do |bl| bl.update_column(:builder_id, nil) end end