ProcessingTaskQueue¶
#include <processing_task_queue.hpp>
Inherited by sgns::processing::ProcessingTaskQueueImpl
Public Functions¶
| Name | |
|---|---|
| virtual | ~ProcessingTaskQueue() =default Distributed task queue interface. |
| virtual outcome::result< void > | EnqueueTask(const SGProcessing::Task & task, const std::list< SGProcessing::SubTask > & subTasks) =0 |
| virtual bool | GetSubTasks(const std::string & taskId, std::list< SGProcessing::SubTask > & subTasks) =0 |
| virtual outcome::result< std::pair< std::string, SGProcessing::Task > > | GrabTask() =0 |
| virtual outcome::result< std::shared_ptr< crdt::AtomicTransaction > > | CompleteTask(const std::string & taskId, const SGProcessing::TaskResult & result) =0 |
| virtual bool | IsTaskCompleted(const std::string & taskId) =0 Checks if the task is completed. |
| virtual void | MarkTaskBad(const std::string & taskKey) =0 Mark a task key as bad to be skipped. |
Public Functions Documentation¶
function ~ProcessingTaskQueue¶
Distributed task queue interface.
Provides enqueue, retrieval, and completion tracking for tasks and their subtasks.
function EnqueueTask¶
virtual outcome::result< void > EnqueueTask(
const SGProcessing::Task & task,
const std::list< SGProcessing::SubTask > & subTasks
) =0
Parameters:
- task - task to enqueue
- subTasks - list of subtasks that the task has been split to
Reimplemented by: sgns::processing::ProcessingTaskQueueImpl::EnqueueTask
Enqueues a task with subtasks that the task has been split to
function GetSubTasks¶
virtual bool GetSubTasks(
const std::string & taskId,
std::list< SGProcessing::SubTask > & subTasks
) =0
Parameters:
- taskId - task id
- subTasks - list of found subtasks
Return: false if task not found
Reimplemented by: sgns::processing::ProcessingTaskQueueImpl::GetSubTasks
Returns a list of subtasks linked to taskId
function GrabTask¶
Return:
- taskId - task id
- task
Reimplemented by: sgns::processing::ProcessingTaskQueueImpl::GrabTask
Grabs a task from task queue
function CompleteTask¶
virtual outcome::result< std::shared_ptr< crdt::AtomicTransaction > > CompleteTask(
const std::string & taskId,
const SGProcessing::TaskResult & result
) =0
Parameters:
- taskId - task id
- result - task result
Reimplemented by: sgns::processing::ProcessingTaskQueueImpl::CompleteTask
Handles task completion
function IsTaskCompleted¶
Checks if the task is completed.
Parameters:
- taskId Task id.
Return: true if the task is completed, false otherwise.
Reimplemented by: sgns::processing::ProcessingTaskQueueImpl::IsTaskCompleted
function MarkTaskBad¶
Mark a task key as bad to be skipped.
Parameters:
- taskKey Task key to mark as bad.
Reimplemented by: sgns::processing::ProcessingTaskQueueImpl::MarkTaskBad
Updated on 2026-03-04 at 13:10:44 -0800