feat(ui): log invocation source id on socket event

This commit is contained in:
psychedelicious 2024-07-08 21:39:51 +10:00
parent 89e6233fbf
commit c49b90e621
4 changed files with 9 additions and 6 deletions

View File

@ -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]);

View File

@ -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

View File

@ -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;

View File

@ -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;