mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
A recorded batch failure does not return the message to SQS 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
52b07e3ea4
commit
f317233939
1 changed files with 14 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ from uuid import UUID
|
|||
|
||||
from utilities.aws_lambda.cloud_logs import cloudwatch_url
|
||||
from utilities.aws_lambda.default_orchestrator import default_orchestrator
|
||||
from domain.tasks.subtasks import SubTaskFailure
|
||||
from domain.tasks.tasks import Source
|
||||
from orchestration.task_orchestrator import TaskOrchestrator
|
||||
|
||||
|
|
@ -87,6 +88,19 @@ def task_handler(
|
|||
work=lambda: func(body, context),
|
||||
cloud_logs_url=cloud_logs_url,
|
||||
)
|
||||
except SubTaskFailure as recorded:
|
||||
# A recorded failure (ADR-0055): run_subtask has already
|
||||
# failed the SubTask with the structured details — that
|
||||
# record IS the outcome. Never returned to SQS for retry;
|
||||
# recovery is a deliberate re-send of the sub_task's
|
||||
# own inputs.
|
||||
logger.warning(
|
||||
"subtask recorded failure, not retrying "
|
||||
"(task_source=%s subtask_id=%s): %s",
|
||||
task_source,
|
||||
subtask_id,
|
||||
recorded,
|
||||
)
|
||||
except Exception:
|
||||
logger.exception(
|
||||
"subtask failed (task_source=%s subtask_id=%s)",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue