Commit 1fb247b
committed
improvement(scheduler): skip claim once a queue is exhausted and drop workflowUtils non-null assertion
Addresses Greptile review on PR #4578:
- track per-queue exhaustion when a claim returns fewer than CHUNK_SIZE
rows; subsequent iterations skip the claim query for that queue. Saves
one DB round-trip per iteration once one queue drains while the other
is still working.
- narrow workflowUtils to a local const inside the loop body so the
schedule processing branch only runs when the import has completed.
Removes the misleading non-null assertion.1 parent 65c117b commit 1fb247b
1 file changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
| 333 | + | |
332 | 334 | | |
333 | 335 | | |
| 336 | + | |
334 | 337 | | |
335 | 338 | | |
336 | 339 | | |
337 | | - | |
338 | | - | |
| 340 | + | |
| 341 | + | |
339 | 342 | | |
340 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
341 | 347 | | |
342 | 348 | | |
343 | 349 | | |
| |||
352 | 358 | | |
353 | 359 | | |
354 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
355 | 369 | | |
356 | | - | |
357 | | - | |
358 | | - | |
| 370 | + | |
359 | 371 | | |
360 | 372 | | |
361 | 373 | | |
| |||
0 commit comments