mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): ignore events after canceling session
This commit is contained in:
@ -90,6 +90,14 @@ export const setEventListeners = (arg: SetEventListenersArg) => {
|
||||
* Invocation started
|
||||
*/
|
||||
socket.on('invocation_started', (data) => {
|
||||
if (getState().system.canceledSession === data.graph_execution_state_id) {
|
||||
log.trace(
|
||||
{ data, sessionId: data.graph_execution_state_id },
|
||||
`Ignored invocation started (${data.node.type}) for canceled session (${data.graph_execution_state_id})`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
log.info(
|
||||
{ data, sessionId: data.graph_execution_state_id },
|
||||
`Invocation started (${data.node.type})`
|
||||
@ -101,6 +109,14 @@ export const setEventListeners = (arg: SetEventListenersArg) => {
|
||||
* Generator progress
|
||||
*/
|
||||
socket.on('generator_progress', (data) => {
|
||||
if (getState().system.canceledSession === data.graph_execution_state_id) {
|
||||
log.trace(
|
||||
{ data, sessionId: data.graph_execution_state_id },
|
||||
`Ignored generator progress (${data.node.type}) for canceled session (${data.graph_execution_state_id})`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
log.trace(
|
||||
{ data, sessionId: data.graph_execution_state_id },
|
||||
`Generator progress (${data.node.type})`
|
||||
|
Reference in New Issue
Block a user