gaps.cli.config.run_with_status_updates#

run_with_status_updates(run_func, config, logging_options, status_update_args, exclude)[source]#

Run a function and write status updated before/after execution.

Parameters:
  • run_func (callable) – A function to run.

  • config (dict) – Dictionary of node-specific inputs to run_func.

  • logging_options (dict) – Dictionary of logging options containing at least the following key-value pairs:

    namestr

    Job name; name of log file.

    log_directorypath-like

    Path to log file directory.

    verbosebool

    Option to turn on debug logging.

    nodebool

    Flag for whether this is a node-level logger. If this is a node logger, and the log level is info, the log_file will be None (sent to stdout).

  • status_update_args (iterable) – An iterable containing the first three initializer arguments for StatusUpdates.

  • exclude (collection | None) – A collection (list, set, dict, etc.) of keys that should be excluded from the job status file that is written before/after the function runs.