# dbprocessing

# dbprocessing.runMe.runMe

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

  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)
    Parameters
      dbu `DButils`

        Open database connection.

      utc_file_date `date`

        Characteristic date of the file being created.

      process_id `int`

        `process_id` of process to run.

      input_files `list` of `int`

        `file_id` of all input files.

      pq `ProcessQueue`

        ProcessQueue instance

      version_bump `int`, 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.

      force `bool`, 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)

    make a command line for actually doing this running

    Parameters
      rundir `str`, optional

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

    Other Parameters
      force `bool`, default False

        Not used.

    Notes

    Creates a temp directory that needs to be cleaned!!

  moveToError(fname)

    Moves a file from incoming to error

    Parameters
      fname `str`

        Full path to file to move into error directory.

  moveToIncoming(fname)

    Moves a file from location to incoming

    Parameters
      fname `str`

        Full path to file to move into incoming.

Release: 0.1.0 Doc generation date: Feb 10, 2022