Commit 511a4a2
authored
refactor: stream batched items to db during backfill (#229)
Streams and upserts in chunks as items arrive, instead of collecting all first.
- Chunks of 250 items
- Upsert runs while fetch continues
- Logging: removes mid-sync count log (total unknown until done)1 parent 8fe9847 commit 511a4a2
1 file changed
Lines changed: 14 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | | - | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
1013 | 1015 | | |
1014 | 1016 | | |
1015 | 1017 | | |
1016 | | - | |
1017 | | - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1018 | 1021 | | |
1019 | | - | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
1020 | 1027 | | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
| 1028 | + | |
1025 | 1029 | | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
| 1030 | + | |
1029 | 1031 | | |
1030 | | - | |
| 1032 | + | |
1031 | 1033 | | |
1032 | 1034 | | |
1033 | 1035 | | |
| |||
0 commit comments