Commit 2e3e512
committed
admin: paginate episodes/ list — R2 caps at 1000 per call
Cloudflare R2 list() returns at most 1000 objects per call. The
episodes/ prefix has 2609 objects (172 MP3s + companion files),
so my previous single-call listing only saw 1000 of them. Most
of the published basenames I was supposed to be filtering against
weren't in publishedBasenames, so the stale-orphan filter only
caught a fraction of the orphans. Result: the visible draft count
stayed inflated even after v2026.05.05.4.
Fix by paginating with the cursor returned when result.truncated
is true. Capped at 20 iterations as a safety net against an
infinite loop. Single Promise.all keeps the parallelism win.
Bump release to admin-v2026.05.05.5.
Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>1 parent 47828f9 commit 2e3e512
2 files changed
Lines changed: 29 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3915 | 3915 | | |
3916 | 3916 | | |
3917 | 3917 | | |
3918 | | - | |
| 3918 | + | |
| 3919 | + | |
| 3920 | + | |
| 3921 | + | |
| 3922 | + | |
| 3923 | + | |
| 3924 | + | |
| 3925 | + | |
| 3926 | + | |
| 3927 | + | |
| 3928 | + | |
| 3929 | + | |
| 3930 | + | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
3919 | 3945 | | |
3920 | 3946 | | |
3921 | | - | |
| 3947 | + | |
3922 | 3948 | | |
3923 | | - | |
3924 | | - | |
3925 | | - | |
3926 | | - | |
3927 | | - | |
3928 | | - | |
3929 | | - | |
3930 | | - | |
3931 | | - | |
3932 | 3949 | | |
3933 | 3950 | | |
3934 | 3951 | | |
| |||
0 commit comments