Skip to contents

Repeatedly polls /uploadInputNodesStatus until the task completes, fails, is canceled, or times out.

Usage

waitForUploadTask(
  task_id,
  poll_seconds = 2,
  timeout_seconds = 600,
  cursor = 0L,
  api_key = NULL,
  url = NULL,
  quiet = TRUE
)

Arguments

task_id

Upload task identifier returned by uploadInputNodes().

poll_seconds

Delay between status polls in seconds.

timeout_seconds

Maximum time to wait before aborting.

cursor

Optional starting event cursor.

api_key

API key used for authenticated write actions. If NULL, CATMAPR_API_KEY is used.

url

API URL override. If NULL, CATMAPR_API_URL is used when set.

quiet

If FALSE, stream newly received upload events with message() while waiting.

Value

Final task-status payload.

Examples

if (FALSE) { # \dontrun{
waitForUploadTask(
  task_id = "upload-task-id",
  poll_seconds = 2,
  api_key = Sys.getenv("CATMAPR_API_KEY")
)
} # }