Thanks for this excellent package!
It would be great to have an option to queue jobs so that only a reasonable number run concurrently.
The simplest way to allow for that would be to enable users to start a master-job that then controls the other jobs - but while jobs can spawn other jobs with the rstudioapi one cannot use job::job inside job::job (Error: RStudio not running). Could that be changed?
A more complex wrapper that automatically allows one to have a job pending until at most x other jobs are running would be a nice addition, but less important.
# This works - but using job::job instead of the runScript does not
job::job(spawn_test = {
for (i in 1:5) {
tempfile <- tempfile(fileext = ".R")
write_lines("print('Hello')", tempfile)
rstudioapi::jobRunScript(tempfile)
}
}, import = NULL)
Thanks for this excellent package!
It would be great to have an option to queue jobs so that only a reasonable number run concurrently.
The simplest way to allow for that would be to enable users to start a master-job that then controls the other jobs - but while jobs can spawn other jobs with the
rstudioapione cannot use job::job inside job::job (Error: RStudio not running). Could that be changed?A more complex wrapper that automatically allows one to have a job pending until at most x other jobs are running would be a nice addition, but less important.