Learn R Programming

taskqueue (version 0.2.0)

project_reset: Reset a Project

Description

Resets all tasks in a project to idle status, stops the project, and optionally cleans log files. Useful for restarting a project from scratch.

Usage

project_reset(project, log_clean = TRUE)

Value

Invisibly returns NULL. Called for side effects (resetting tasks and logs).

Arguments

project

Character string specifying the project name.

log_clean

Logical indicating whether to delete log files. Default is TRUE.

Details

This function performs three operations:

  1. Resets all tasks to idle status (NULL) using task_reset

  2. Stops the project using project_stop

  3. Optionally deletes all log files from resource log folders

Use this when you want to:

  • Restart failed tasks

  • Re-run all tasks after fixing code

  • Clean up before redeploying workers

Warning: Setting log_clean = TRUE permanently deletes all log files, which may contain useful debugging information.

See Also

task_reset, project_stop, project_start

Examples

Run this code
if (FALSE) {
# Not run:
# Reset project and clean logs
project_reset("simulation_study")

# Reset but keep logs for debugging
project_reset("simulation_study", log_clean = FALSE)

# Restart after reset
project_start("simulation_study")
worker_slurm("simulation_study", "hpc", fun = my_function)
}

Run the code above in your browser using DataLab