Commit 2727b4c
committed
fix(table): fire-and-forget run-column dispatch
Large fan-outs (thousands of rows) issue sequential trigger.dev HTTP calls
inside scheduleRunsForRows.batchEnqueue. Awaiting that loop held the HTTP
response (and the AI tool span) open for ~5 min on a 6k-row table — the user
saw an 11-min "running" because the tool didn't return until every job had
been enqueued. Run the dispatcher in the background and return immediately;
contract response now reports `triggered: null` since the count isn't known
synchronously.1 parent b23ba1b commit 2727b4c
3 files changed
Lines changed: 23 additions & 6 deletions
File tree
- apps/sim
- app/api/table/[tableId]/columns/run
- lib
- api/contracts
- copilot/tools/server/table
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | | - | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
898 | | - | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
899 | 904 | | |
900 | 905 | | |
901 | 906 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1415 | 1415 | | |
1416 | 1416 | | |
1417 | 1417 | | |
1418 | | - | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
1419 | 1422 | | |
1420 | 1423 | | |
1421 | 1424 | | |
1422 | 1425 | | |
1423 | 1426 | | |
1424 | 1427 | | |
| 1428 | + | |
| 1429 | + | |
1425 | 1430 | | |
1426 | 1431 | | |
1427 | 1432 | | |
1428 | 1433 | | |
1429 | | - | |
1430 | | - | |
| 1434 | + | |
| 1435 | + | |
1431 | 1436 | | |
1432 | 1437 | | |
1433 | 1438 | | |
| |||
0 commit comments