dbprocessing.runMe.runMe

class dbprocessing.runMe.runMe(dbu, utc_file_date, process_id, input_files, pq, version_bump=None, force=False)[source]

class holds all the info it takes to run a process

Warning

As this object holds a reference to DButils, both directly and within a reference to ProcessQueue, that database should be closed before the program terminates. Deleting this object will ordinarily suffice.

__init__(dbu, utc_file_date, process_id, input_files, pq, version_bump=None, force=False)[source]
Parameters
dbuDButils

Open database connection.

utc_file_datedate

Characteristic date of the file being created.

process_idint

process_id of process to run.

input_fileslist of int

file_id of all input files.

pqProcessQueue

ProcessQueue instance

version_bumpint, optional

Which element of the output version to bump. Forces output if specified. Default: run only on changed inputs, and bump version according to the normal rules.

forcebool, default False

Force processing regardless of version bumping or out-of-date.

Methods

make_command_line([force, rundir])

make a command line for actually doing this running

moveToError(fname)

Moves a file from incoming to error

moveToIncoming(fname)

Moves a file from location to incoming

make_command_line(force=False, rundir=None)[source]

make a command line for actually doing this running

Parameters
rundirstr, optional

Directory to run in, default use a freshly-created temp directory.

Other Parameters
forcebool, default False

Not used.

Notes

Creates a temp directory that needs to be cleaned!!

moveToError(fname)[source]

Moves a file from incoming to error

Parameters
fnamestr

Full path to file to move into error directory.

moveToIncoming(fname)[source]

Moves a file from location to incoming

Parameters
fnamestr

Full path to file to move into incoming.


Release: 0.1.0 Doc generation date: Feb 10, 2022