Fix error handling in upsert_job_cache method

This commit is contained in:
Théophile Diot 2024-03-10 17:27:31 +00:00
parent 0093647c51
commit f629c8455b
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -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: