run, poll, step, read, and finalize tessiflow jobs
Usage
job_maybe_start(flow_name, job_name)
job_start(flow_name, job_name)
job_step(flow_name, job_name)
job_on_error(flow_name, job_name, error)
job_poll(flow_name, job_name)
job_read(flow_name, job_name, timeout = 1)
job_finalize(flow_name, job_name)
job_reset(flow_name, job_name)
Value
invisibly
invisibly
character vector of output from process. Names are one or more of output
, error
and process
and match the names from processx::poll_io
Functions
job_maybe_start()
: check to see if it's time to start a job and call the job runner if it is.the job will be started if following conditions are all true:
runs-on
must match the computer name as listed inSys.info()["nodename"]
if
must be true in the current contextneeds
must have finished running since the last time this ran (with return value = 0 unlessif
evaluates to true)the most recent run in
scheduled_runs
is after the last actual run time for this job
job_start()
: run the job in acallr
processjob_step()
: Run the next step in a jobjob_on_error()
: Updates flows table and database, writes to log, and finalizes running session on errorjob_poll()
: poll the processstdout
andstderr
streams and call job_step when ready.job_read()
: Readstdout
andstderr
from the process and write to log. When ready, call job_stepjob_finalize()
: Closes R session, writes to log, console and database, and updatesretval
.job_reset()
: Resets job for next run, updates flows table but NOT database, writes to log