mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
🐛 Fix bug with internal hooks and CLI workflow execution
This commit is contained in:
parent
27543fcdd4
commit
653a8bb42e
|
@ -11,6 +11,7 @@ import {
|
||||||
CredentialTypes,
|
CredentialTypes,
|
||||||
Db,
|
Db,
|
||||||
ExternalHooks,
|
ExternalHooks,
|
||||||
|
InternalHooksManager,
|
||||||
IWorkflowBase,
|
IWorkflowBase,
|
||||||
IWorkflowExecutionDataProcess,
|
IWorkflowExecutionDataProcess,
|
||||||
LoadNodesAndCredentials,
|
LoadNodesAndCredentials,
|
||||||
|
@ -123,6 +124,9 @@ export class Execute extends Command {
|
||||||
const externalHooks = ExternalHooks();
|
const externalHooks = ExternalHooks();
|
||||||
await externalHooks.init();
|
await externalHooks.init();
|
||||||
|
|
||||||
|
const instanceId = await UserSettings.getInstanceId();
|
||||||
|
InternalHooksManager.init(instanceId);
|
||||||
|
|
||||||
// Add the found types to an instance other parts of the application can use
|
// Add the found types to an instance other parts of the application can use
|
||||||
const nodeTypes = NodeTypes();
|
const nodeTypes = NodeTypes();
|
||||||
await nodeTypes.init(loadNodesAndCredentials.nodeTypes);
|
await nodeTypes.init(loadNodesAndCredentials.nodeTypes);
|
||||||
|
|
|
@ -28,6 +28,7 @@ import {
|
||||||
CredentialTypes,
|
CredentialTypes,
|
||||||
Db,
|
Db,
|
||||||
ExternalHooks,
|
ExternalHooks,
|
||||||
|
InternalHooksManager,
|
||||||
IWorkflowDb,
|
IWorkflowDb,
|
||||||
IWorkflowExecutionDataProcess,
|
IWorkflowExecutionDataProcess,
|
||||||
LoadNodesAndCredentials,
|
LoadNodesAndCredentials,
|
||||||
|
@ -55,12 +56,12 @@ export class ExecuteBatch extends Command {
|
||||||
static executionTimeout = 3 * 60 * 1000;
|
static executionTimeout = 3 * 60 * 1000;
|
||||||
|
|
||||||
static examples = [
|
static examples = [
|
||||||
`$ n8n executeAll`,
|
`$ n8n executeBatch`,
|
||||||
`$ n8n executeAll --concurrency=10 --skipList=/data/skipList.txt`,
|
`$ n8n executeBatch --concurrency=10 --skipList=/data/skipList.txt`,
|
||||||
`$ n8n executeAll --debug --output=/data/output.json`,
|
`$ n8n executeBatch --debug --output=/data/output.json`,
|
||||||
`$ n8n executeAll --ids=10,13,15 --shortOutput`,
|
`$ n8n executeBatch --ids=10,13,15 --shortOutput`,
|
||||||
`$ n8n executeAll --snapshot=/data/snapshots --shallow`,
|
`$ n8n executeBatch --snapshot=/data/snapshots --shallow`,
|
||||||
`$ n8n executeAll --compare=/data/previousExecutionData --retries=2`,
|
`$ n8n executeBatch --compare=/data/previousExecutionData --retries=2`,
|
||||||
];
|
];
|
||||||
|
|
||||||
static flags = {
|
static flags = {
|
||||||
|
@ -303,6 +304,9 @@ export class ExecuteBatch extends Command {
|
||||||
const externalHooks = ExternalHooks();
|
const externalHooks = ExternalHooks();
|
||||||
await externalHooks.init();
|
await externalHooks.init();
|
||||||
|
|
||||||
|
const instanceId = await UserSettings.getInstanceId();
|
||||||
|
InternalHooksManager.init(instanceId);
|
||||||
|
|
||||||
// Add the found types to an instance other parts of the application can use
|
// Add the found types to an instance other parts of the application can use
|
||||||
const nodeTypes = NodeTypes();
|
const nodeTypes = NodeTypes();
|
||||||
await nodeTypes.init(loadNodesAndCredentials.nodeTypes);
|
await nodeTypes.init(loadNodesAndCredentials.nodeTypes);
|
||||||
|
|
Loading…
Reference in a new issue