Class ForwardTask¶
Defined in File stage.py
Inheritance Relationships¶
Base Type¶
public stage.Task(Class Task)
Class Documentation¶
- stage.ForwardTask : public stage.Task
A ForwardTask reads messages from some input queues performs some action/transformation and forwards the outcome to some output queue. Attributes: application_name: The name of the application currently being used db_url: url to sql server that stores metadata of files. i_queue: The input queue to read input message o_queue: The output queue to write the transformed messages user_obj: An object providing the update_model_cb and data_cb callbacks to be applied on the respective control messages before pushing it to the next stage.
Public Functions
- __init__(self, application_name, db_url, i_queue, o_queue, user_obj)¶
initializes a ForwardTask class with the queues and the callback.
- __call__(self)¶
A busy loop reading messages from the i_queue, acting on those messages and forwarding the output to the output queue. In the case of receiving a 'termination' messages informs the tasks waiting on the output queues about the terminations and returns from the function.