@@ -455,6 +455,14 @@ export class Executor {
455455 success : false ,
456456 output : finalOutput ,
457457 error : 'Workflow execution was cancelled' ,
458+ metadata : {
459+ duration : Date . now ( ) - startTime . getTime ( ) ,
460+ startTime : context . metadata . startTime ! ,
461+ workflowConnections : this . actualWorkflow . connections . map ( ( conn : any ) => ( {
462+ source : conn . source ,
463+ target : conn . target ,
464+ } ) ) ,
465+ } ,
458466 logs : context . blockLogs ,
459467 }
460468 }
@@ -503,6 +511,14 @@ export class Executor {
503511 success : false ,
504512 output : finalOutput ,
505513 error : this . extractErrorMessage ( error ) ,
514+ metadata : {
515+ duration : Date . now ( ) - startTime . getTime ( ) ,
516+ startTime : context . metadata . startTime ! ,
517+ workflowConnections : this . actualWorkflow . connections . map ( ( conn : any ) => ( {
518+ source : conn . source ,
519+ target : conn . target ,
520+ } ) ) ,
521+ } ,
506522 logs : context . blockLogs ,
507523 }
508524 } finally {
@@ -530,6 +546,14 @@ export class Executor {
530546 success : false ,
531547 output : finalOutput ,
532548 error : 'Workflow execution was cancelled' ,
549+ metadata : {
550+ duration : Date . now ( ) - new Date ( context . metadata . startTime ! ) . getTime ( ) ,
551+ startTime : context . metadata . startTime ! ,
552+ workflowConnections : this . actualWorkflow . connections . map ( ( conn : any ) => ( {
553+ source : conn . source ,
554+ target : conn . target ,
555+ } ) ) ,
556+ } ,
533557 logs : context . blockLogs ,
534558 }
535559 }
@@ -596,6 +620,14 @@ export class Executor {
596620 success : false ,
597621 output : finalOutput ,
598622 error : this . extractErrorMessage ( error ) ,
623+ metadata : {
624+ duration : Date . now ( ) - new Date ( context . metadata . startTime ! ) . getTime ( ) ,
625+ startTime : context . metadata . startTime ! ,
626+ workflowConnections : this . actualWorkflow . connections . map ( ( conn : any ) => ( {
627+ source : conn . source ,
628+ target : conn . target ,
629+ } ) ) ,
630+ } ,
599631 logs : context . blockLogs ,
600632 }
601633 }
0 commit comments