From 5d7cf5b89560f7b32bdff74f9ecf0a1ef0d682f7 Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Fri, 30 Jun 2023 13:38:19 +0000 Subject: [PATCH] Lower the tool update interval to 1 minute Signed-off-by: Gabriel Adrian Samfira --- runner/common/pool.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runner/common/pool.go b/runner/common/pool.go index f3b9d15e..39d8d3fa 100644 --- a/runner/common/pool.go +++ b/runner/common/pool.go @@ -25,9 +25,10 @@ const ( PoolConsilitationInterval = 5 * time.Second PoolReapTimeoutInterval = 5 * time.Minute // Temporary tools download token is valid for 1 hour by default. - // Set this to 15 minutes. This should allow enough time even on slow - // clouds for the instance to spin up, download the tools and join gh. - PoolToolUpdateInterval = 15 * time.Minute + // There is no point in making an API call to get available tools, for every runner + // we spin up. We cache the tools for one minute. This should save us a lot of API calls + // in cases where we have a lot of runners spin up at the same time. + PoolToolUpdateInterval = 1 * time.Minute // BackoffTimer is the time we wait before attempting to make another request // to the github API.