Skip to content

Commit 42271d9

Browse files
authored
Create README.md
1 parent c56ba8c commit 42271d9

File tree

1 file changed

+18
-0
lines changed
  • Server-Side Components/Script Includes/Safe Bulk Update Runner

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Safe Bulk Update Runner (auto-throttled)
2+
3+
## Use case
4+
Run large backfills/hygiene tasks without timeouts or instance impact. Instead of one risky long transaction, process records in chunks and automatically schedule the next slice.
5+
6+
## Where to use it
7+
- Script Include invoked from Background Script, on-demand Scheduled Job, or Flow Action wrapper.
8+
9+
## How it works
10+
- Queries a time-boxed chunk (e.g., 40 seconds, 500 rows).
11+
- Executes a caller-supplied per-record function.
12+
- Saves a checkpoint (`sys_id`) in a system property.
13+
- Uses `ScheduleOnce` to queue the next slice (no `gs.sleep`).
14+
15+
## Configuration
16+
- Target table, encoded query, orderBy field (default `sys_id`)
17+
- Chunk size, max execution seconds
18+
- Property name for checkpoint

0 commit comments

Comments
 (0)