summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildscripts/scons_cache_prune.py6
-rw-r--r--etc/evergreen.yml2
2 files changed, 6 insertions, 2 deletions
diff --git a/buildscripts/scons_cache_prune.py b/buildscripts/scons_cache_prune.py
index 6391fbc0b9d..c9f4387e273 100644
--- a/buildscripts/scons_cache_prune.py
+++ b/buildscripts/scons_cache_prune.py
@@ -109,7 +109,11 @@ def prune_cache(cache_path, cache_size_gb, clean_ratio):
# check the atime again just to make sure something wasn't accessed while
# we pruning other files.
- if cache_item.time < os.stat(cache_item.path).st_atime:
+ try:
+ if cache_item.time < os.stat(cache_item.path).st_atime:
+ continue
+ except FileNotFoundError as err:
+ LOGGER.warning("Unable to find file %s : %s", cache_item, err)
continue
to_remove = cache_item.path + ".del"
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 07e9fb051ee..1596ba075db 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -3220,7 +3220,7 @@ buildvariants:
display_name: "Shared SCons Cache Pruning"
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
run_on:
- - ubuntu1604-test
+ - ubuntu2204-small
stepback: false
tasks:
- name: shared_scons_cache_pruning