Task State Manager#
- class ccat_data_transfer.task_state_manager.TaskStateManager(redis_client)[source]#
Bases:
objectManager for tracking and recovering task states across all operation types.
- register_task(task_id, operation_type, operation_id, additional_info=None, max_retries=3)[source]#
Register a task in Redis with its metadata.
- Parameters:
task_id (str) – Celery task ID
operation_type (str) – Type of operation (transfer, archive, package, delete, verify)
operation_id (int) – Database ID of the operation
additional_info (dict, optional) – Additional context about the operation
max_retries (int, optional) – Maximum retry count for this task
Overview#
The Task State Manager manages task state transitions and persistence.
Key Functions#
update_task_state()- Update task stateget_task_state()- Get current task state