Update db for the jobs that are ran only once

This commit is contained in:
TheophileDiot 2022-11-17 15:41:03 +01:00
parent c14765c6c6
commit 192c6755c3
1 changed files with 11 additions and 0 deletions

View File

@ -192,6 +192,17 @@ class JobScheduler(ApiCaller):
file = job["file"]
if self.__job_wrapper(path, plugin, name, file) >= 2:
ret = False
err = self.__db.update_job(plugin, name, ret)
if not err:
self.__logger.info(
f"Successfully updated database for the job {name} from plugin {plugin}",
)
else:
self.__logger.warning(
f"Failed to update database for the job {name} from plugin {plugin}: {err}",
)
except:
self.__logger.error(
f"Exception while running jobs once for plugin {plugin} : {format_exc()}",