mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Store insights data at the end of executions (no-changelog) (#13905)
Co-authored-by: Danny Martini <danny@n8n.io> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
committed by
GitHub
parent
d80b49d6e5
commit
cb5a803f9e
@@ -24,7 +24,7 @@ export async function createManyWorkflows(
|
||||
}
|
||||
|
||||
export function newWorkflow(attributes: Partial<IWorkflowDb> = {}): IWorkflowDb {
|
||||
const { active, name, nodes, connections, versionId } = attributes;
|
||||
const { active, name, nodes, connections, versionId, settings } = attributes;
|
||||
|
||||
const workflowEntity = Container.get(WorkflowRepository).create({
|
||||
active: active ?? false,
|
||||
@@ -41,7 +41,7 @@ export function newWorkflow(attributes: Partial<IWorkflowDb> = {}): IWorkflowDb
|
||||
],
|
||||
connections: connections ?? {},
|
||||
versionId: versionId ?? uuid(),
|
||||
settings: {},
|
||||
settings: settings ?? {},
|
||||
...attributes,
|
||||
});
|
||||
|
||||
@@ -119,8 +119,9 @@ export async function shareWorkflowWithProjects(
|
||||
}
|
||||
|
||||
export async function getWorkflowSharing(workflow: IWorkflowBase) {
|
||||
return await Container.get(SharedWorkflowRepository).findBy({
|
||||
workflowId: workflow.id,
|
||||
return await Container.get(SharedWorkflowRepository).find({
|
||||
where: { workflowId: workflow.id },
|
||||
relations: { project: true },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,9 @@ const repositories = [
|
||||
'WorkflowTagMapping',
|
||||
'ApiKey',
|
||||
'Folder',
|
||||
'InsightsRaw',
|
||||
'InsightsMetadata',
|
||||
'InsightsByPeriod',
|
||||
] as const;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user