Manager
Manager
Manager class that manages the registration and execution of different processes, including collecting, checking, extraction, and pushing to the database.
Attributes:
-
context(Context) –The shared context for managing data among the different processes.
-
collectors(List[Collect]) –A list of collecting processes.
-
checks(List[Check]) –A list of checking processes.
-
extractors(List[Extract]) –A list of extraction processes.
-
pushes(List[Push]) –A list of push processes for database operations.
Methods:
-
add_callback–Adds a callback function to be executed after the process finishes.
-
processes–Returns a dictionary with all the registered processes.
-
publish–Executes the registered processes in sequence.
-
register–Registers a process in the correct category based on its type.
callbacks
property
callbacks: Dict[Type[Callback], Callable]
Returns the dict of registered callbacks.
add_callback
add_callback(callback_type: Callback, callback: callable) -> None
Adds a callback function to be executed after the process finishes.