climate_ref_celery.worker_tasks
#
Celery worker tasks for handling diagnostic execution executions.
handle_failure(task_id, execution_id)
#
Handle a failed or killed diagnostic task
This is called via link_error when the diagnostic task fails, is killed
by a time limit, or the worker process is lost.
It marks the corresponding Execution row as failed
so it does not remain in an indeterminate state.
Since this callback is triggered by infrastructure-level failures (worker crash, OOM kill, time limit), the execution group's dirty flag is left as-is so the execution will be retried on the next solve.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
str
|
The Celery task UUID of the failed task |
required |
execution_id
|
int
|
The unique identifier for the diagnostic execution |
required |
Source code in packages/climate-ref-celery/src/climate_ref_celery/worker_tasks.py
handle_result(result, execution_id)
#
Handle the result of a diagnostic execution
This function is called when a diagnostic execution is completed successfully.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
ExecutionResult
|
The result of the diagnostic execution |
required |
execution_id
|
int
|
The unique identifier for the diagnostic execution |
required |