From 7f6fe18d0a54665f676a56ed8fb8f222b49584a2 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Tue, 16 May 2023 07:52:00 +0000 Subject: [PATCH] ci: do not start new fetch after 4 hours --- .github/workflows/debian-cache.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debian-cache.yml b/.github/workflows/debian-cache.yml index ab56d05..0a4608b 100644 --- a/.github/workflows/debian-cache.yml +++ b/.github/workflows/debian-cache.yml @@ -60,6 +60,8 @@ jobs: run: | import os import logging + import time + import datetime from subprocess import getstatusoutput @@ -67,7 +69,7 @@ jobs: status, output = getstatusoutput( "./out-of-tree --log-level=warn " "distro debian get-deb " - "--ignore-cached --max=32" + "--ignore-cached --max=16" ) logging.info(output) return status == 0 @@ -89,7 +91,9 @@ jobs: uploaded = [] - while get_kernels(): + timeout = time.time() + datetime.timedelta(hours=4).seconds + + while get_kernels() and time.time() < timeout: for f in os.listdir(): if not f.endswith('.deb'): continue