From a068133149304b6ff72ccf6fd4028c8354337709 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Wed, 15 Sep 2021 18:09:52 +1000 Subject: [PATCH] fixed bug where job is not set to "In Progress" for run_ai_on --- BUGs | 2 +- pa_job_manager.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/BUGs b/BUGs index 61f9da5..4b75298 100644 --- a/BUGs +++ b/BUGs @@ -1,4 +1,4 @@ -### Next: 57 +### Next: 58 BUG-52: updated tag on person, and it said successful, but the colour was red/danger BUG-53: when viewing list, moving to a video and the name of the file is not updated (are there 2 in the dom?) BUG-56: when making a viewing list of AI:mich, (any search?) and going past the page_size, it gets the wrong data from the DB for the 'next' entry diff --git a/pa_job_manager.py b/pa_job_manager.py index 8006764..9c0bced 100644 --- a/pa_job_manager.py +++ b/pa_job_manager.py @@ -1230,6 +1230,7 @@ def AddToJobImageCount(job, entry ): #################################################################################################################################### def JobRunAIOn(job): # TODO: need to use JobInProgress... (here and other jobs?) -- so should I move this to HandleJob??? + JobProgressState( job, "In Progress" ) AddLogForJob(job, f"INFO: Starting job to look for faces in files...") which_person=[jex.value for jex in job.extra if jex.name == "person"][0] if which_person == "all": @@ -1276,6 +1277,7 @@ def JobRunAIOn(job): # TODO: should be JobTransformImage() ;) #################################################################################################################################### def JobRotateImage(job): + JobProgressState( job, "In Progress" ) AddLogForJob(job, f"INFO: Starting rotation/flip of image file...") id=[jex.value for jex in job.extra if jex.name == "id"][0] amt=[jex.value for jex in job.extra if jex.name == "amt"][0] @@ -1540,6 +1542,7 @@ def RemoveDups(job): #################################################################################################################################### def JobMoveFiles(job): AddLogForJob(job, f"INFO: Starting Move Files job...") + JobProgressState( job, "In Progress" ) prefix=[jex.value for jex in job.extra if jex.name == "prefix"][0] suffix=[jex.value for jex in job.extra if jex.name == "suffix"][0] storage_rp=[jex.value for jex in job.extra if jex.name == "storage_rp"][0] @@ -1560,6 +1563,7 @@ def JobMoveFiles(job): #################################################################################################################################### def JobDeleteFiles(job): AddLogForJob(job, f"INFO: Starting Delete Files job...") + JobProgressState( job, "In Progress" ) for jex in job.extra: if 'eid-' in jex.name: del_me=session.query(Entry).join(File).filter(Entry.id==jex.value).first() @@ -1576,6 +1580,7 @@ def JobDeleteFiles(job): #################################################################################################################################### def JobRestoreFiles(job): AddLogForJob(job, f"INFO: Starting Restore Files job...") + JobProgressState( job, "In Progress" ) for jex in job.extra: if 'eid-' in jex.name: restore_me=session.query(Entry).join(File).filter(Entry.id==jex.value).first() @@ -1598,6 +1603,7 @@ def InitialValidationChecks(): session.add(job) settings = session.query(Settings).first() AddLogForJob(job, f"INFO: Starting Initial Validation checks...") + JobProgressState( job, "In Progress" ) path=SettingsRBPath() rbp_exists=0 if os.path.exists(path):