From e079edcc59044cfe2b67fde5e2bb353dd83a7f4c Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Fri, 6 Jan 2023 18:11:04 +0000 Subject: [PATCH] Reduce lifetime of cached sumo-id file to 1 day (#111) --- src/fmu/sumo/uploader/caseondisk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fmu/sumo/uploader/caseondisk.py b/src/fmu/sumo/uploader/caseondisk.py index 62f32c08..e47b7b7e 100644 --- a/src/fmu/sumo/uploader/caseondisk.py +++ b/src/fmu/sumo/uploader/caseondisk.py @@ -140,8 +140,8 @@ def _get_sumo_parent_id(self): file_age = datetime.datetime.today() - datetime.datetime.fromtimestamp( cached_file.lstat().st_mtime ) - if file_age.days < 14: - logger.debug("cached sumo_parent_id is less than 14 days, using it.") + if file_age.days < 1: + logger.debug("cached sumo_parent_id is less than 1 days, using it.") with open(str(cached_file), "r") as infile: filecontents = yaml.safe_load(infile) sumo_parent_id = filecontents.get(cached_key)