Release.
- Added Task couriers
- ClientTaskCourier
- get_task_result - returns task retuls, if it exists.
- wait_for_task_result - Waits for the task result to appear.
- add_task_to_queue - adds a task to the queue for processing.
- check_for_done - checks if the task has completed.
- WorkerTaskCourier
- get_tasks - pops many tasks from queue and returns it.
- get_task - pops one task from queue and returns it.
- wait_for_task - waits for task and returns it.
- return_task_result - returns result to the client side.
- BaseWorker
- wait_for_tasks - waits for tasks in the queue, pops and returns them.
- perform_tasks - abstract method for processing tasks. Should return a list of tasks.
- return_task_results - method method for sending task results to the clients.
- perform - the main method that starts the task worker. total_iterations argument are required (how many processing iterations the worker should do).
- ClassicWorker
- perform_tasks - Method for processing tasks. Returns a list of tasks.
task is a tuple: (task_id, task_data).
task_data is a dictionary with keys "function", "args" and "kwargs".
Calls a function with args "args" and kwargs "kwargs", unpacking them, and returns the execution result.
Arguments "args" and "kwargs" are optional.