CapPow / HerbASAP

An effort to automate image post processing for natural history collections
GNU General Public License v3.0
8 stars 3 forks source link

class variable issues when multiple images trigger watchdog #29

Closed CapPow closed 5 years ago

CapPow commented 5 years ago

While doing some speed tests, I attempted to drop many, many images into a watched folder at once. The first few images usually process fine, however as threads get busy there are occasional class variable issues which raise exceptions or assign incorrect class variables to images. Somehow, images are getting the go ahead to start processing out of queue order. This is likely related to reset_working_variables() being called too frequently or some issue with self.processing_image.

CapPow commented 5 years ago

The issue has been isolated to save_output_images in postProcessing.py. Where multiple save_worker workers are spawned (1 per save operation checked in UI). Each eventually calling handle_save_result() upon completion. The class variable self.save_jobs_running was an attempt to deal with this but apparently is not functioning. Any fixes should either use or replace (and remove) the self.save_jobs_running class variable.

temp work around

In case anyone is working on another issue / project and needs a work around: selecting only 1 output option in the Image Locations tab will avoid the issue.

CapPow commented 5 years ago

fixed in commit: 4abd67fb2f406d45c428024661b8b6c90ccae8c2