From 4e5d056824fecd285e0869636f7d076ea4146bd6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:39:51 +1000 Subject: [PATCH] feat(ui): log invocation source id on socket event --- .../listeners/socketio/socketGeneratorProgress.ts | 4 ++-- .../listeners/socketio/socketInvocationComplete.ts | 5 ++++- .../listeners/socketio/socketInvocationError.ts | 2 +- .../listeners/socketio/socketInvocationStarted.ts | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketGeneratorProgress.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketGeneratorProgress.ts index cc81dbdf75..e28235da59 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketGeneratorProgress.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketGeneratorProgress.ts @@ -13,8 +13,8 @@ export const addGeneratorProgressEventListener = (startAppListening: AppStartLis startAppListening({ actionCreator: socketGeneratorProgress, effect: (action) => { - log.trace(parseify(action.payload), `Generator progress`); - const { invocation_source_id, step, total_steps, progress_image, origin } = action.payload.data; + const { invocation_source_id, invocation, step, total_steps, progress_image, origin } = action.payload.data; + log.trace(parseify(action.payload), `Generator progress (${invocation.type}, ${invocation_source_id})`); if (origin === 'workflows') { const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]); diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts index 9b36a2b3f9..1b382c77df 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts @@ -22,7 +22,10 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi actionCreator: socketInvocationComplete, effect: async (action, { dispatch, getState }) => { const { data } = action.payload; - log.debug({ data: parseify(data) }, `Invocation complete (${data.invocation.type})`); + log.debug( + { data: parseify(data) }, + `Invocation complete (${data.invocation.type}, ${data.invocation_source_id})` + ); const { result, invocation_source_id } = data; // This complete event has an associated image output diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationError.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationError.ts index b34f34a079..cb3e1d2fa5 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationError.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationError.ts @@ -13,7 +13,7 @@ export const addInvocationErrorEventListener = (startAppListening: AppStartListe actionCreator: socketInvocationError, effect: (action) => { const { invocation_source_id, invocation, error_type, error_message, error_traceback } = action.payload.data; - log.error(parseify(action.payload), `Invocation error (${invocation.type})`); + log.error(parseify(action.payload), `Invocation error (${invocation.type}, ${invocation_source_id})`); const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]); if (nes) { nes.status = zNodeStatus.enum.FAILED; diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationStarted.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationStarted.ts index 7dae869ce2..d32a43b8f9 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationStarted.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationStarted.ts @@ -12,8 +12,8 @@ export const addInvocationStartedEventListener = (startAppListening: AppStartLis startAppListening({ actionCreator: socketInvocationStarted, effect: (action) => { - log.debug(parseify(action.payload), `Invocation started (${action.payload.data.invocation.type})`); - const { invocation_source_id } = action.payload.data; + const { invocation_source_id, invocation } = action.payload.data; + log.debug(parseify(action.payload), `Invocation started (${invocation.type}, ${invocation_source_id})`); const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]); if (nes) { nes.status = zNodeStatus.enum.IN_PROGRESS;