Skip to contents

Deletes a task folder by task id, or deletes all tasks listed in a mirai_tasks tibble returned from mirai_ls().

Usage

mirai_rm(x, force = FALSE, ...)

# S3 method for class 'character'
mirai_rm(x, force = FALSE, ...)

# S3 method for class 'mirai_tasks'
mirai_rm(x, force = FALSE, ...)

# Default S3 method
mirai_rm(x, force = FALSE, ...)

Arguments

x

Either a task identifier or a mirai_tasks tibble returned from mirai_ls().

force

Logical. If TRUE, delete the selected task folders even when they appear locked or running.

...

Reserved for S3 method dispatch.

Value

A character vector of deleted task IDs (invisibly).

Examples

if (FALSE) { # \dontrun{
mirai_rm("task-abc")
mirai_rm("task-abc", force = TRUE)

mirai_ls() |>
  dplyr::filter(state == "error") |>
  mirai_rm()
} # }