Learn R Programming

taskqueue (version 0.2.0)

project_resource_add_jobs: Manage SLURM Job List for Project Resource

Description

Adds a SLURM job name to the list of active jobs for a project-resource association, or resets the job list.

Usage

project_resource_add_jobs(project, resource, job, reset = FALSE)

Value

Invisibly returns NULL. Called for side effects (updating job list).

Arguments

project

Character string specifying the project name.

resource

Character string specifying the resource name.

job

Character string with the SLURM job name to add. If missing, the job list is reset to empty.

reset

Logical indicating whether to clear the job list before adding. Default is FALSE. If TRUE, replaces all jobs with job.

Details

The job list is a semicolon-separated string of SLURM job names stored in the database. This list is used by project_stop to cancel all jobs when stopping a project.

Job names are automatically added by worker_slurm when submitting workers.

Currently only supports SLURM resources.

See Also

worker_slurm, project_stop

Examples

Run this code
if (FALSE) {
# Not run:
# Add a job (typically done automatically by worker_slurm)
project_resource_add_jobs("simulation_study", "hpc", "job_12345")

# Reset job list
project_resource_add_jobs("simulation_study", "hpc", reset = TRUE)
}

Run the code above in your browser using DataLab