From 62199b0fb158e55fa0a3f6a1fc268a2be7d3f3d0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 18 Feb 2024 15:58:53 +1100 Subject: [PATCH] feat(nodes): improved error messages in processor --- .../session_processor/session_processor_default.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/invokeai/app/services/session_processor/session_processor_default.py b/invokeai/app/services/session_processor/session_processor_default.py index 3035a74a5a..7d761e627f 100644 --- a/invokeai/app/services/session_processor/session_processor_default.py +++ b/invokeai/app/services/session_processor/session_processor_default.py @@ -249,18 +249,20 @@ class DefaultSessionProcessor(SessionProcessorBase): self._invoker.services.logger.debug("Waiting for next polling interval or event") poll_now_event.wait(self._polling_interval) continue - except Exception as e: + except Exception: # Non-fatal error in processor, cancel the queue item and wait for next polling interval or event - self._invoker.services.logger.error(f"Error in session processor: {e}") + self._invoker.services.logger.error( + f"Non-fatal error in session processor:\n{traceback.format_exc()}" + ) if self._queue_item is not None: self._invoker.services.session_queue.cancel_queue_item( self._queue_item.item_id, error=traceback.format_exc() ) poll_now_event.wait(self._polling_interval) continue - except Exception as e: + except Exception: # Fatal error in processor, log and pass - we're done here - self._invoker.services.logger.error(f"Fatal Error in session processor: {e}") + self._invoker.services.logger.error(f"Fatal Error in session processor:\n{traceback.format_exc()}") pass finally: stop_event.clear()