Commit 193e26e
fix(events): fix ordering — update all Lua scripts for global concurrency release
Previous commit only updated dequeue/release/enqueue Lua scripts but missed:
- acknowledgeMessage: runs completing weren't releasing global concurrency
- nackMessage: nacked runs weren't releasing global concurrency
- moveToDeadLetterQueue: DLQ'd runs weren't releasing
- clearMessageFromConcurrencySets: cleanup wasn't releasing
Also: set globalConcurrencyLimit on subscriber task's queue (not dedicated queue)
since the dev worker only monitors task queues, not custom queues.
Removed queue override from PublishEventService — runs stay in the task's
own queue and ordering is enforced by concurrencyKey + concurrencyLimit:1
+ globalConcurrencyLimit:N.
E2E verified: globalConcurrencyLimit=2 with 3 keys correctly limits to max
2 concurrent runs while maintaining per-key ordering.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent a8a5ce3 commit 193e26e
File tree
4 files changed
+64
-10
lines changed- apps/webapp/app/v3/services
- events
- internal-packages/run-engine/src/run-queue
- references/hello-world/src/trigger
4 files changed
+64
-10
lines changedLines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
| 376 | + | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
429 | 443 | | |
430 | 444 | | |
431 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | 306 | | |
312 | 307 | | |
313 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2063 | 2063 | | |
2064 | 2064 | | |
2065 | 2065 | | |
| 2066 | + | |
2066 | 2067 | | |
2067 | 2068 | | |
2068 | 2069 | | |
| |||
2105 | 2106 | | |
2106 | 2107 | | |
2107 | 2108 | | |
| 2109 | + | |
2108 | 2110 | | |
2109 | 2111 | | |
2110 | 2112 | | |
| |||
2151 | 2153 | | |
2152 | 2154 | | |
2153 | 2155 | | |
| 2156 | + | |
2154 | 2157 | | |
2155 | 2158 | | |
2156 | 2159 | | |
| |||
2184 | 2187 | | |
2185 | 2188 | | |
2186 | 2189 | | |
| 2190 | + | |
2187 | 2191 | | |
2188 | 2192 | | |
2189 | 2193 | | |
| |||
2919 | 2923 | | |
2920 | 2924 | | |
2921 | 2925 | | |
2922 | | - | |
| 2926 | + | |
2923 | 2927 | | |
2924 | 2928 | | |
2925 | 2929 | | |
| |||
2931 | 2935 | | |
2932 | 2936 | | |
2933 | 2937 | | |
| 2938 | + | |
2934 | 2939 | | |
2935 | 2940 | | |
2936 | 2941 | | |
| |||
2955 | 2960 | | |
2956 | 2961 | | |
2957 | 2962 | | |
| 2963 | + | |
2958 | 2964 | | |
2959 | 2965 | | |
2960 | 2966 | | |
| |||
2967 | 2973 | | |
2968 | 2974 | | |
2969 | 2975 | | |
2970 | | - | |
| 2976 | + | |
2971 | 2977 | | |
2972 | 2978 | | |
2973 | 2979 | | |
| |||
2978 | 2984 | | |
2979 | 2985 | | |
2980 | 2986 | | |
| 2987 | + | |
2981 | 2988 | | |
2982 | 2989 | | |
2983 | 2990 | | |
| |||
2990 | 2997 | | |
2991 | 2998 | | |
2992 | 2999 | | |
| 3000 | + | |
2993 | 3001 | | |
2994 | 3002 | | |
2995 | 3003 | | |
| |||
3009 | 3017 | | |
3010 | 3018 | | |
3011 | 3019 | | |
3012 | | - | |
| 3020 | + | |
3013 | 3021 | | |
3014 | 3022 | | |
3015 | 3023 | | |
| |||
3021 | 3029 | | |
3022 | 3030 | | |
3023 | 3031 | | |
| 3032 | + | |
3024 | 3033 | | |
3025 | 3034 | | |
3026 | 3035 | | |
| |||
3043 | 3052 | | |
3044 | 3053 | | |
3045 | 3054 | | |
| 3055 | + | |
3046 | 3056 | | |
3047 | 3057 | | |
3048 | 3058 | | |
| |||
3151 | 3161 | | |
3152 | 3162 | | |
3153 | 3163 | | |
3154 | | - | |
| 3164 | + | |
3155 | 3165 | | |
3156 | 3166 | | |
3157 | 3167 | | |
3158 | 3168 | | |
3159 | 3169 | | |
3160 | 3170 | | |
| 3171 | + | |
3161 | 3172 | | |
3162 | 3173 | | |
3163 | 3174 | | |
3164 | 3175 | | |
3165 | 3176 | | |
3166 | 3177 | | |
| 3178 | + | |
3167 | 3179 | | |
3168 | 3180 | | |
3169 | 3181 | | |
| |||
3285 | 3297 | | |
3286 | 3298 | | |
3287 | 3299 | | |
| 3300 | + | |
3288 | 3301 | | |
3289 | 3302 | | |
3290 | 3303 | | |
| |||
3299 | 3312 | | |
3300 | 3313 | | |
3301 | 3314 | | |
| 3315 | + | |
3302 | 3316 | | |
3303 | 3317 | | |
3304 | 3318 | | |
| |||
3314 | 3328 | | |
3315 | 3329 | | |
3316 | 3330 | | |
| 3331 | + | |
3317 | 3332 | | |
3318 | 3333 | | |
3319 | 3334 | | |
| |||
3333 | 3348 | | |
3334 | 3349 | | |
3335 | 3350 | | |
| 3351 | + | |
3336 | 3352 | | |
3337 | 3353 | | |
3338 | 3354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments