This function simply waits until all jobs are terminated.
waitForJobs(ids = NULL, sleep = default.sleep, timeout = 604800,
stop.on.error = FALSE, reg = getDefaultRegistry())[data.frame or integer]
A data.frame (or data.table)
with a column named “job.id”.
Alternatively, you may also pass a vector of integerish job ids.
If not set, defaults to the return value of findSubmitted.
Invalid ids are ignored.
[function(i) | numeric(1)]
Function which returns the duration to sleep in the i-th iteration.
Alternatively, you can pass a single positive numeric value.
[numeric(1)]
After waiting timeout seconds, show a message and return
FALSE. This argument may be required on some systems where, e.g.,
expired jobs or jobs on hold are problematic to detect. If you don't want
a timeout, set this to Inf. Default is 604800 (one week).
[logical(1)]
Immediately cancel if a job terminates with an error? Default is
FALSE.
[Registry]
Registry. If not explicitly passed, uses the default registry (see setDefaultRegistry).
[logical(1)]. Returns TRUE if all jobs terminated
successfully and FALSE if either the timeout is reached or at least
one job terminated with an exception.