
Split pending work into batches, skipping completed items
Source:R/checkpoint.R
pam_pending_batches.RdSplit pending work into batches, skipping completed items
Examples
ckpt <- tempfile(fileext = ".txt")
ids <- c("a.wav", "b.wav", "c.wav")
pam_pending_batches(ids, ckpt, batch_size = 2) # all three are pending
#> $`1`
#> [1] "a.wav" "b.wav"
#>
#> $`2`
#> [1] "c.wav"
#>
pam_checkpoint_add("a.wav", ckpt)
pam_pending_batches(ids, ckpt, batch_size = 2) # only b and c are left
#> $`1`
#> [1] "b.wav" "c.wav"
#>
unlink(ckpt)