fix(ingest): add error handling (#11905)

This commit is contained in:
Aseem Bansal 2024-11-20 20:47:39 +05:30 committed by GitHub
parent 524ef8c6d0
commit 05d362a94e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -401,7 +401,10 @@ class DataProcessCleanup:
total_runs=job.get("entity").get("runs").get("total"),
)
if datajob_entity.total_runs > 0:
self.delete_dpi_from_datajobs(datajob_entity)
try:
self.delete_dpi_from_datajobs(datajob_entity)
except Exception as e:
logger.error(f"While trying to delete {datajob_entity} got {e}")
if (
datajob_entity.total_runs == 0
and self.config.delete_empty_data_jobs