Adjust error handling of processing sub-process

Removes exception catching when collecting subprocess result which led
to the service silently go over failing file processing.

Now, the sub-process doesn't return any results if it failed. It is made
sure that an empty result is still returned if no images were present on
the file to process.
This commit is contained in:
Julius Unverfehrt 2023-08-17 13:26:19 +02:00
parent 4a825cb264
commit 501fd48d69

View File

@ -17,9 +17,6 @@ def wrap_in_process(fn):
process = multiprocessing.Process(target=process_fn, args=args, kwargs=kwargs)
process.start()
process.join()
try:
return return_queue.pop(0)
except IndexError:
logger.warning("No results returned by subprocess.")
return return_queue.pop(0)
return wrapped_fn