Fetch information about a task. This is much more detailed than
the information in task_status. If a task is running we also
fetch the true status via its driver, which can be slower.
Value
An object of class hipercow_task_info, which will print
nicely. This is just a list with elements:
id: the task identifierstatus: the retrieved statusdriver: the driver used to run the task (or NA)data: the task data (depends on the type of task)times: a vector of timesretry_chain: the retry chain (orNULL)
You can see and access these elements more easily by running
unclass() on the result of task_info().
Examples
cleanup <- hipercow_example_helper()
#> ℹ This example uses a special helper
id <- task_create_expr(runif(1))
#> ✔ Submitted task '107d1f17a3cc17bab6084a61deb1d3af' using 'example'
task_wait(id)
#> [1] TRUE
# Task information at completion includes times:
task_info(id)
#>
#> ── task 107d1f17a3cc17bab6084a61deb1d3af (success) ─────────────────────────────
#> ℹ Submitted with 'example'
#> ℹ Task type: expression
#> • Expression: runif(1)
#> • Locals: (none)
#> • Environment: default
#> USER_KEY:
#> /home/runner/work/_temp/hv-20251114-1abe51810004/hipercow/example/key
#> USER_PUBKEY:
#> /home/runner/work/_temp/hv-20251114-1abe51810004/hipercow/example/key.pub
#> R_GC_MEM_GROW: 3
#> ℹ Created at 2025-11-14 17:38:25.915377 (moments ago)
#> ℹ Started at 2025-11-14 17:38:26.020988 (moments ago; waited 106ms)
#> ℹ Finished at 2025-11-14 17:38:26.112241 (moments ago; ran for 92ms)
# If you need to work with these times, use the "times" element:
task_info(id)$times
#> created started finished
#> "2025-11-14 17:38:25 UTC" "2025-11-14 17:38:26 UTC" "2025-11-14 17:38:26 UTC"
# If a task is retried, this information appears as a retry chain:
id2 <- task_retry(id)
#> ✔ Submitted task '8a814ff80bb9d849eb87c0393bc1a1cb' using 'example'
task_info(id2, follow = FALSE)
#>
#> ── task 8a814ff80bb9d849eb87c0393bc1a1cb (submitted) ───────────────────────────
#> ℹ Submitted with 'example'
#> ℹ Task type: expression
#> • Expression: runif(1)
#> • Locals: (none)
#> • Environment: default
#> USER_KEY:
#> /home/runner/work/_temp/hv-20251114-1abe51810004/hipercow/example/key
#> USER_PUBKEY:
#> /home/runner/work/_temp/hv-20251114-1abe51810004/hipercow/example/key.pub
#> R_GC_MEM_GROW: 3
#> ℹ Created at 2025-11-14 17:38:25.915377 (moments ago)
#> ! Not started yet (waiting for 1.1s)
#> ! Not finished yet (waiting to start)
#> ℹ Last of a chain of a task retried 1 time
task_info(id2)
#>
#> ── task 8a814ff80bb9d849eb87c0393bc1a1cb (success) ─────────────────────────────
#> ℹ Submitted with 'example'
#> ℹ Task type: expression
#> • Expression: runif(1)
#> • Locals: (none)
#> • Environment: default
#> USER_KEY:
#> /home/runner/work/_temp/hv-20251114-1abe51810004/hipercow/example/key
#> USER_PUBKEY:
#> /home/runner/work/_temp/hv-20251114-1abe51810004/hipercow/example/key.pub
#> R_GC_MEM_GROW: 3
#> ℹ Created at 2025-11-14 17:38:25.915377 (moments ago)
#> ℹ Started at 2025-11-14 17:38:27.017278 (moments ago; waited 1.1s)
#> ℹ Finished at 2025-11-14 17:38:27.018255 (moments ago; ran for 1ms)
#> ℹ Last of a chain of a task retried 1 time
cleanup()
#> ℹ Cleaning up example
