Skip to content

Commit f0f4326

Browse files
committed
chore: remove unused import and other cleanup
1 parent d389557 commit f0f4326

File tree

2 files changed

+2
-35
lines changed

2 files changed

+2
-35
lines changed

packages/cli/src/modules/chat-hub/chat-hub.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ export class ChatHubService {
14111411
const common = {
14121412
position: [600, 500] as [number, number],
14131413
id: uuidv4(),
1414-
name: 'Chat Model',
1414+
name: NODE_NAMES.CHAT_MODEL,
14151415
credentials,
14161416
type: PROVIDER_NODE_TYPE_MAP[provider].name,
14171417
typeVersion: PROVIDER_NODE_TYPE_MAP[provider].version,

packages/cli/src/workflows/workflow-execution.service.ts

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import type {
1717
WorkflowExecuteMode,
1818
IWorkflowExecutionDataProcess,
1919
IWorkflowBase,
20-
ITaskData,
2120
} from 'n8n-workflow';
2221
import { SubworkflowOperationError, Workflow } from 'n8n-workflow';
2322

@@ -241,10 +240,6 @@ export class WorkflowExecutionService {
241240
httpResponse: Response,
242241
streamingEnabled: boolean = true,
243242
) {
244-
// TODO: does this matter?
245-
workflowData.active = false;
246-
247-
// Start the workflow
248243
const data: IWorkflowExecutionDataProcess = {
249244
executionMode: 'chat',
250245
workflowData,
@@ -254,35 +249,7 @@ export class WorkflowExecutionService {
254249
httpResponse,
255250
};
256251

257-
/**
258-
* (Comment copied from executeManually method. Decide how to handle this later.)
259-
* Historically, manual executions in scaling mode ran in the main process,
260-
* so some execution details were never persisted in the database.
261-
*
262-
* Currently, manual executions in scaling mode are offloaded to workers,
263-
* so we persist all details to give workers full access to them.
264-
*/
265-
// if (
266-
// this.globalConfig.executions.mode === 'queue' &&
267-
// process.env.OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS === 'true'
268-
// ) {
269-
// data.executionData = {
270-
// startData: {
271-
// startNodes: data.startNodes,
272-
// },
273-
// resultData: {
274-
// // @ts-expect-error CAT-752
275-
// runData: undefined,
276-
// },
277-
// manualData: {
278-
// userId: data.userId,
279-
// triggerToStartFrom,
280-
// },
281-
// };
282-
// }
283-
284-
// TODO: enable realtime mode?
285-
const executionId = await this.workflowRunner.run(data);
252+
const executionId = await this.workflowRunner.run(data, undefined, true);
286253

287254
return {
288255
executionId,

0 commit comments

Comments
 (0)