Skip to content

Commit 26cf10a

Browse files
fix: include timestamp with end
1 parent c6eb524 commit 26cf10a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/core/src/execution-engine/workflow-execute.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,7 @@ export class WorkflowExecute {
24052405
await closeFunction;
24062406
} catch (errorClose) {
24072407
Logger.error(
2408-
`There was a problem deactivating trigger of workflow "${workflow.id}": "${errorClose.message}"`,
2408+
`There was a 'problem' deactivating trigger of workflow "${workflow.id}": "${errorClose.message}"`,
24092409
{
24102410
workflowId: workflow.id,
24112411
},
@@ -2530,7 +2530,13 @@ export class WorkflowExecute {
25302530
this.moveNodeMetadata();
25312531
// Prevent from running the hook if the error is an abort error as it was already handled
25322532
if (!this.isCancelled) {
2533-
await this.additionalData.hooks?.runHook('sendChunk', [{ type: 'end' }]);
2533+
const structuredChunk: EndChunk = {
2534+
type: 'end',
2535+
metadata: {
2536+
timestamp: Date.now(),
2537+
},
2538+
};
2539+
await this.additionalData.hooks?.runHook('sendChunk', [structuredChunk]);
25342540
await this.additionalData.hooks?.runHook('workflowExecuteAfter', [
25352541
fullRunData,
25362542
newStaticData,

0 commit comments

Comments
 (0)