Skip to contents
  • job_status() returns the job's state, "queued", "running", "done" or "failed", together with the last lines of its log.

  • job_result() returns the answer of the job, in the same form as solve(). By default it waits for the job to finish, checking every poll seconds for up to timeout seconds. Like solve(), it warns when the service granted less time than the job's time_limit.

  • job_log() returns the job's log as text.

  • job_delete() deletes the job and its stored answer from the service.

Usage

job_status(job)

job_result(job, wait = TRUE, timeout = NULL, poll = 0.5)

job_log(job)

job_delete(job)

Arguments

job

A job, as returned by submit().

wait

TRUE waits until the job is finished. FALSE asks once, and is an error if the job is not finished yet.

timeout

How many seconds to wait at most: by default 120, or the job's time_limit plus 60 when that is longer.

poll

How many seconds to wait between two checks.

Value

job_status() returns the job's state as a list.

job_result() returns the answer, a list of class quicopt_result (see solve()).

job_log() returns the log as a single character string.

job_delete() returns NULL, invisibly.

Examples

if (FALSE) { # \dontrun{
job <- submit(m)
job_status(job)
res <- job_result(job)
job_delete(job)
} # }