Manager.database_dispatcher.DatabaseDispatcher

Usage

Source

Manager.database_dispatcher.DatabaseDispatcher(
    config_file, proj_mana, **kwargs
)

Methods

Name Description
__init__() The database dispatcher takes a configuration file that uses a nested dictionary of strategies that have values
dispatch() The dispatch method takes a list of strategies and dispatches the functions using a configuration. A nested

__init__()

The database dispatcher takes a configuration file that uses a nested dictionary of strategies that have values

Usage

Source

__init__(config_file, proj_mana, **kwargs)

corresponding to the parameter used in the functions. The database dispatcher inherits from the DatabaseManagement class so it only dispatches functions/methods from this class.

See https://www.oreilly.com/library/view/python-cookbook/0596001673/ch01s07.html for more details.

Parameters
config_file: str.

A configuration (YAML) file that has a “Database_config” key/section.

proj_mana: ProjectManagement.

A configuration variable for connecting projects.

kwargs: dict. = {}
Key-word arguments.

dispatch()

The dispatch method takes a list of strategies and dispatches the functions using a configuration. A nested

Usage

Source

dispatch(strategies=None, dispatcher=None, configuration=None)

dispatcher triggers the recursiveness of the dispatch function. Dispatching means that the functions are serialized in an ordered dictionary, and then executed in that order.

Parameters
strategies: list. = None

Keys used to access the various dispatch functions and their corresponding configurations.

dispatcher: dict. = None

A dictionary of functions that will be “dispatched”. This can be nested if using a general strategy.

configuration: dict. = None
A dictionary of kwargs (keyword arguments) used to configure the dispatched functions.