File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
apps/webapp/app/runEngine/services Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -379,9 +379,15 @@ export class RunEngineTriggerTaskService {
379379 this . prisma
380380 ) ;
381381
382- // If the returned run has a different friendlyId, it was debounced
383- // Stop the outer span to prevent a duplicate - the debounced span was created via onDebounced
384- if ( taskRun . friendlyId !== runFriendlyId ) {
382+ // If the returned run has a different friendlyId, it was debounced.
383+ // For triggerAndWait: stop the outer span since a replacement debounced span was created via onDebounced.
384+ // For regular trigger: let the span complete normally - no replacement span needed since the
385+ // original run already has its span from when it was first created.
386+ if (
387+ taskRun . friendlyId !== runFriendlyId &&
388+ body . options ?. debounce &&
389+ body . options ?. resumeParentOnCompletion
390+ ) {
385391 event . stop ( ) ;
386392 }
387393
You can’t perform that action at this time.
0 commit comments