fix(ui): update event handling to match new types

This commit is contained in:
psychedelicious 2024-05-20 15:52:28 +10:00
parent cbd3b15cae
commit 585feccf82
3 changed files with 5 additions and 5 deletions

View File

@ -133,8 +133,8 @@ export const addControlAdapterPreprocessor = (startAppListening: AppStartListeni
const [invocationCompleteAction] = await take( const [invocationCompleteAction] = await take(
(action): action is ReturnType<typeof socketInvocationComplete> => (action): action is ReturnType<typeof socketInvocationComplete> =>
socketInvocationComplete.match(action) && socketInvocationComplete.match(action) &&
action.payload.data.queue_batch_id === enqueueResult.batch.batch_id && action.payload.data.batch_id === enqueueResult.batch.batch_id &&
action.payload.data.source_node_id === processorNode.id action.payload.data.invocation_source_id === processorNode.id
); );
// We still have to check the output type // We still have to check the output type

View File

@ -12,8 +12,8 @@ export const addGeneratorProgressEventListener = (startAppListening: AppStartLis
actionCreator: socketGeneratorProgress, actionCreator: socketGeneratorProgress,
effect: (action) => { effect: (action) => {
log.trace(action.payload, `Generator progress`); log.trace(action.payload, `Generator progress`);
const { source_node_id, step, total_steps, progress_image } = action.payload.data; const { invocation_source_id, step, total_steps, progress_image } = action.payload.data;
const nes = deepClone($nodeExecutionStates.get()[source_node_id]); const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]);
if (nes) { if (nes) {
nes.status = zNodeStatus.enum.IN_PROGRESS; nes.status = zNodeStatus.enum.IN_PROGRESS;
nes.progress = (step + 1) / total_steps; nes.progress = (step + 1) / total_steps;

View File

@ -613,7 +613,7 @@ export const canvasSlice = createSlice({
state.batchIds = state.batchIds.filter((id) => id !== batch_status.batch_id); state.batchIds = state.batchIds.filter((id) => id !== batch_status.batch_id);
} }
const queueItemStatus = action.payload.data.queue_item.status; const queueItemStatus = action.payload.data.status;
if (queueItemStatus === 'canceled' || queueItemStatus === 'failed') { if (queueItemStatus === 'canceled' || queueItemStatus === 'failed') {
resetStagingAreaIfEmpty(state); resetStagingAreaIfEmpty(state);
} }