ci: do not start new fetch after 4 hours
This commit is contained in:
parent
53183245ce
commit
7f6fe18d0a
8
.github/workflows/debian-cache.yml
vendored
8
.github/workflows/debian-cache.yml
vendored
@ -60,6 +60,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
import time
|
||||||
|
import datetime
|
||||||
|
|
||||||
from subprocess import getstatusoutput
|
from subprocess import getstatusoutput
|
||||||
|
|
||||||
@ -67,7 +69,7 @@ jobs:
|
|||||||
status, output = getstatusoutput(
|
status, output = getstatusoutput(
|
||||||
"./out-of-tree --log-level=warn "
|
"./out-of-tree --log-level=warn "
|
||||||
"distro debian get-deb "
|
"distro debian get-deb "
|
||||||
"--ignore-cached --max=32"
|
"--ignore-cached --max=16"
|
||||||
)
|
)
|
||||||
logging.info(output)
|
logging.info(output)
|
||||||
return status == 0
|
return status == 0
|
||||||
@ -89,7 +91,9 @@ jobs:
|
|||||||
|
|
||||||
uploaded = []
|
uploaded = []
|
||||||
|
|
||||||
while get_kernels():
|
timeout = time.time() + datetime.timedelta(hours=4).seconds
|
||||||
|
|
||||||
|
while get_kernels() and time.time() < timeout:
|
||||||
for f in os.listdir():
|
for f in os.listdir():
|
||||||
if not f.endswith('.deb'):
|
if not f.endswith('.deb'):
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user