Learn R Programming

taskqueue (version 0.2.0)

task_get: Get Detailed Task Information

Description

Retrieves detailed information about tasks with specified statuses, including execution times and error messages.

Usage

task_get(project, status = c("failed"), limit = 10, con = NULL)

Value

A data frame with detailed task information:

id

Task ID

status

Current status

start

Start timestamp

finish

Finish timestamp

message

Error message (for failed tasks) or NULL

runtime

Calculated runtime in seconds

Arguments

project

Character string specifying the project name.

status

Character vector of statuses to retrieve. Can include "working", "failed", "finished", or "all". Default is "failed".

limit

Maximum number of tasks to return (integer). Default is 10.

con

An optional database connection. If NULL, a new connection is created and closed automatically.

Details

Useful for:

  • Debugging failed tasks (examine error messages)

  • Analyzing runtime patterns

  • Identifying slow tasks

The runtime column is calculated as the difference between finish and start times in seconds.

Specifying status = "all" returns tasks of any status.

See Also

task_status, task_reset

Examples

Run this code
if (FALSE) {
# Not run:
# Get first 10 failed tasks
failed <- task_get("simulation_study", status = "failed")
print(failed$message)  # View error messages

# Get all finished tasks
finished <- task_get("simulation_study", status = "finished", limit = 1000)
hist(finished$runtime, main = "Task Runtime Distribution")

# Get tasks of any status
all_tasks <- task_get("simulation_study", status = "all", limit = 50)
}

Run the code above in your browser using DataLab