Skip to content

Commit 418c932

Browse files
tidy(processor): remove test callbacks
1 parent 9117db2 commit 418c932

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

invokeai/app/api/dependencies.py

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -104,40 +104,7 @@ def initialize(config: InvokeAIAppConfig, event_handler_id: int, logger: Logger
104104
names = SimpleNameService()
105105
performance_statistics = InvocationStatsService()
106106

107-
def on_before_run_session(queue_item):
108-
print("BEFORE RUN SESSION", queue_item.item_id)
109-
return True
110-
111-
def on_before_run_node(invocation, queue_item):
112-
print("BEFORE RUN NODE", invocation.id)
113-
return True
114-
115-
def on_after_run_node(invocation, queue_item, output):
116-
print("AFTER RUN NODE", invocation.id)
117-
return True
118-
119-
def on_node_error(invocation, queue_item, error_type, error_message, error_traceback):
120-
print("NODE ERROR", invocation.id)
121-
return True
122-
123-
def on_after_run_session(queue_item):
124-
print("AFTER RUN SESSION", queue_item.item_id)
125-
return True
126-
127-
def on_non_fatal_processor_error(queue_item, error_type, error_message, error_traceback):
128-
print("NON FATAL PROCESSOR ERROR", error_message)
129-
return True
130-
131-
session_processor = DefaultSessionProcessor(
132-
DefaultSessionRunner(
133-
on_before_run_session_callbacks=[on_before_run_session],
134-
on_before_run_node_callbacks=[on_before_run_node],
135-
on_after_run_node_callbacks=[on_after_run_node],
136-
on_node_error_callbacks=[on_node_error],
137-
on_after_run_session_callbacks=[on_after_run_session],
138-
),
139-
on_non_fatal_processor_error_callbacks=[on_non_fatal_processor_error],
140-
)
107+
session_processor = DefaultSessionProcessor(session_runner=DefaultSessionRunner())
141108
session_queue = SqliteSessionQueue(db=db)
142109
urls = LocalUrlService()
143110
workflow_records = SqliteWorkflowRecordsStorage(db=db)

0 commit comments

Comments
 (0)