7.1.1.1. __init__

Dispatcher.__init__(dmap=None, name='', default_values=None, raises=False, description='', executor=False)[source]

Initializes the dispatcher.

Parameters:
  • dmap (schedula.utils.graph.DiGraph, optional) – A directed graph that stores data & functions parameters.

  • name (str, optional) – The dispatcher’s name.

  • default_values (dict[str, dict], optional) – Data node default values. These will be used as input if it is not specified as inputs in the ArciDispatch algorithm.

  • raises (bool|callable|str, optional) – If True the dispatcher interrupt the dispatch when an error occur, otherwise if raises != ‘’ it logs a warning. If a callable is given it will be executed passing the exception to decide to raise or not the exception.

  • description (str, optional) – The dispatcher’s description.

  • executor (str, optional) –

    A pool executor id to dispatch asynchronously or in parallel.

    There are four default Pool executors to dispatch asynchronously or in parallel:

    • async: execute all functions asynchronously in the same process,

    • parallel: execute all functions in parallel excluding SubDispatch functions,

    • parallel-pool: execute all functions in parallel using a process pool excluding SubDispatch functions,

    • parallel-dispatch: execute all functions in parallel including SubDispatch.