mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): log invocation source id on socket event
This commit is contained in:
parent
118278b372
commit
4e5d056824
@ -13,8 +13,8 @@ export const addGeneratorProgressEventListener = (startAppListening: AppStartLis
|
|||||||
startAppListening({
|
startAppListening({
|
||||||
actionCreator: socketGeneratorProgress,
|
actionCreator: socketGeneratorProgress,
|
||||||
effect: (action) => {
|
effect: (action) => {
|
||||||
log.trace(parseify(action.payload), `Generator progress`);
|
const { invocation_source_id, invocation, step, total_steps, progress_image, origin } = action.payload.data;
|
||||||
const { invocation_source_id, step, total_steps, progress_image, origin } = action.payload.data;
|
log.trace(parseify(action.payload), `Generator progress (${invocation.type}, ${invocation_source_id})`);
|
||||||
|
|
||||||
if (origin === 'workflows') {
|
if (origin === 'workflows') {
|
||||||
const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]);
|
const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]);
|
||||||
|
@ -22,7 +22,10 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi
|
|||||||
actionCreator: socketInvocationComplete,
|
actionCreator: socketInvocationComplete,
|
||||||
effect: async (action, { dispatch, getState }) => {
|
effect: async (action, { dispatch, getState }) => {
|
||||||
const { data } = action.payload;
|
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;
|
const { result, invocation_source_id } = data;
|
||||||
// This complete event has an associated image output
|
// This complete event has an associated image output
|
||||||
|
@ -13,7 +13,7 @@ export const addInvocationErrorEventListener = (startAppListening: AppStartListe
|
|||||||
actionCreator: socketInvocationError,
|
actionCreator: socketInvocationError,
|
||||||
effect: (action) => {
|
effect: (action) => {
|
||||||
const { invocation_source_id, invocation, error_type, error_message, error_traceback } = action.payload.data;
|
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]);
|
const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]);
|
||||||
if (nes) {
|
if (nes) {
|
||||||
nes.status = zNodeStatus.enum.FAILED;
|
nes.status = zNodeStatus.enum.FAILED;
|
||||||
|
@ -12,8 +12,8 @@ export const addInvocationStartedEventListener = (startAppListening: AppStartLis
|
|||||||
startAppListening({
|
startAppListening({
|
||||||
actionCreator: socketInvocationStarted,
|
actionCreator: socketInvocationStarted,
|
||||||
effect: (action) => {
|
effect: (action) => {
|
||||||
log.debug(parseify(action.payload), `Invocation started (${action.payload.data.invocation.type})`);
|
const { invocation_source_id, invocation } = action.payload.data;
|
||||||
const { invocation_source_id } = action.payload.data;
|
log.debug(parseify(action.payload), `Invocation started (${invocation.type}, ${invocation_source_id})`);
|
||||||
const nes = deepClone($nodeExecutionStates.get()[invocation_source_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;
|
||||||
|
Loading…
Reference in New Issue
Block a user