Commit 8e72e13
fix(processing): enforce waitForCompletion inside markAsFailed to prevent completion races
Move waitForCompletion() into markAsFailed() so every call site is
automatically safe against in-flight fire-and-forget completions.
Remove the now-redundant external waitForCompletion() calls in route.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent f093193 commit 8e72e13
File tree
2 files changed
+3
-6
lines changed- apps/sim
- app/api/workflows/[id]/execute
- lib/logs/execution
2 files changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
644 | | - | |
645 | 644 | | |
646 | 645 | | |
647 | 646 | | |
| |||
1027 | 1026 | | |
1028 | 1027 | | |
1029 | 1028 | | |
1030 | | - | |
1031 | 1029 | | |
1032 | 1030 | | |
1033 | 1031 | | |
| |||
1043 | 1041 | | |
1044 | 1042 | | |
1045 | 1043 | | |
1046 | | - | |
1047 | 1044 | | |
1048 | 1045 | | |
1049 | 1046 | | |
| |||
1060 | 1057 | | |
1061 | 1058 | | |
1062 | 1059 | | |
1063 | | - | |
1064 | 1060 | | |
1065 | 1061 | | |
1066 | 1062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
679 | | - | |
| 678 | + | |
| 679 | + | |
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| |||
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
| 796 | + | |
796 | 797 | | |
797 | 798 | | |
798 | 799 | | |
| |||
0 commit comments