rerunUploadJob: Rerun an upload job, after some external error condition has...

View source: R/rerunUploadJob.R

rerunUploadJobR Documentation

Rerun an upload job, after some external error condition has been fixed.

Description

Rerun an upload job, after some external error condition has been fixed.

Usage

rerunUploadJob(j)

Arguments

j

the job, as an integer scalar job number. This can be a top-level job, or one of its sub-jobs; in the latter case, the top-level job is used anyway. The top-level job must be of type "uploadFile", otherwise this function throws an error.

Details

First, this removes all traces of the original upload job, both from the job database, and the filesystem:

  • all jobs in server.sqlite with stump == j

  • the folder at j$path

  • any files /sgm/errors/NNNNNNNN.rds where stump(NNNNNNNN) == j

Then, a new hardlink to the original uploaded file is created in /sgm/uploads. The original uploaded file is recorded in j$filename, or as sj$file where sj is a subjob of j with type "unpackArchive").

This will cause the uploadServer to re-queue the originally-uploaded file.

Value

TRUE if the job was found, of the correct type and resubmitted to the uploadServer; FALSE otherwise.

Note

this function does not revert any changes to receiver databases affected by the original processing of the uploaded file.

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm

See Also

processServer


MotusWTS/motusServer documentation built on Aug. 8, 2024, 10:23 p.m.