From f629c8455bdd01a545d81df8ec8b8fe155e9fe74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Sun, 10 Mar 2024 17:27:31 +0000 Subject: [PATCH] Fix error handling in upsert_job_cache method --- src/common/utils/jobs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/utils/jobs.py b/src/common/utils/jobs.py index 68b5c7b26..bb6db8422 100644 --- a/src/common/utils/jobs.py +++ b/src/common/utils/jobs.py @@ -139,7 +139,8 @@ class Job: try: with LOCK: - if self.db.upsert_job_cache(service_id, name, content, job_name=job_name or self.job_name, checksum=checksum): # type: ignore + err = self.db.upsert_job_cache(service_id, name, content, job_name=job_name or self.job_name, checksum=checksum) # type: ignore + if err: ret = False if ret and isinstance(file_cache, Path) and delete_file and file_cache != cache_path: