cancel_jobs: cancel_jobs

View source: R/cancelJob.R

cancel_jobsR Documentation

cancel_jobs

Description

Cancel running jobs.

Usage

cancel_jobs(connection, jobs_status)

Arguments

connection

a connection created by create_connection

jobs_status

a list returned by create_jobs or update_jobs_status. This is reference like in C++ language.

Details

This function cancels the specified jobs on the server. Status field in the return value is set to "aborted".

Errors and warnings

When errors occur, execution can be stopped with the following messages:

  • for unknown connections:

    • "Unknown protocol."

  • for http/https connections:

    • "BOINC server error: "<error message>""

  • for any connection:

    • "All results have already been received."

    • "All jobs have already been canceled."

Value

a list with current states of jobs. This list contains the following fields:

  • batch_id - ID of the batch that includes the jobs;

  • jobs_name - a name of jobs on BOINC server;

  • results - computation results (NULL if computation is still incomplete); The length of this list is equal to the length of the data;

  • jobs_status - human-readable status for each job;

  • status - computation status, may be:

    • "initialization" - jobs have been submitted to the server, but their status was not requested by update_jobs_status;

    • "in_progress" - BOINC serves jobs;

    • "done" - computations are complete, the results were downloaded;

    • "warning" a recoverable error occurred during the job processing;

    • "error" - a serious error occurred during the job processing;

    • "aborted" - processing was canceled using the cancel_jobs function.

Examples

## Not run: 

# Function for data processing:
fun = function(val)
{
   ...
}

# Data for processing:
data = list(...)

# Connection to the BOINC server:
con = create_connection(...)

# Send jobs to BOINC server:
jobs = create_jobs(con, fun, data)

# Cancel jobs:
jobs = cancel_jobs(con, jobs)

# Stopped with error:
jobs = update_jobs_status(con, jobs)

# Release resources:
close_connection(con)

## End(Not run)

RBOINC.cl documentation built on Nov. 15, 2022, 3 a.m.