|
@@ -21,7 +21,6 @@ from script_build_host.application.observation_views import (
|
|
|
mission_snapshot_view,
|
|
mission_snapshot_view,
|
|
|
task_detail_view,
|
|
task_detail_view,
|
|
|
)
|
|
)
|
|
|
-from script_build_host.domain.errors import BuildNotFound
|
|
|
|
|
from script_build_host.domain.ports import (
|
|
from script_build_host.domain.ports import (
|
|
|
MissionBindingRepository,
|
|
MissionBindingRepository,
|
|
|
PublicationRepository,
|
|
PublicationRepository,
|
|
@@ -142,21 +141,6 @@ def create_script_build_router(
|
|
|
async def execute() -> tuple[int, dict[str, Any]]:
|
|
async def execute() -> tuple[int, dict[str, Any]]:
|
|
|
return await execute_with_root(preallocated_root_trace_id)
|
|
return await execute_with_root(preallocated_root_trace_id)
|
|
|
|
|
|
|
|
- async def resume_reserved(
|
|
|
|
|
- root_trace_id: str | None, _resource_id: int | None
|
|
|
|
|
- ) -> tuple[int, dict[str, Any]]:
|
|
|
|
|
- if root_trace_id is None:
|
|
|
|
|
- raise problem(409, "IDEMPOTENCY_RECOVERY_REQUIRED", "reserved start has no Root")
|
|
|
|
|
- try:
|
|
|
|
|
- result = await mission_service.start_result_by_root(root_trace_id)
|
|
|
|
|
- except BuildNotFound:
|
|
|
|
|
- return await execute_with_root(root_trace_id)
|
|
|
|
|
- return 200, {
|
|
|
|
|
- "script_build_id": result.script_build_id,
|
|
|
|
|
- "status": result.status.value,
|
|
|
|
|
- "root_trace_id": result.root_trace_id,
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
if idempotency_key and http_command_journal is not None:
|
|
if idempotency_key and http_command_journal is not None:
|
|
|
_, payload = await http_command_journal.execute(
|
|
_, payload = await http_command_journal.execute(
|
|
|
principal=actor,
|
|
principal=actor,
|
|
@@ -164,7 +148,6 @@ def create_script_build_router(
|
|
|
idempotency_key=idempotency_key,
|
|
idempotency_key=idempotency_key,
|
|
|
request_payload=body.model_dump(mode="json"),
|
|
request_payload=body.model_dump(mode="json"),
|
|
|
command=execute,
|
|
command=execute,
|
|
|
- resume_reserved=resume_reserved,
|
|
|
|
|
preallocated_root_trace_id=preallocated_root_trace_id,
|
|
preallocated_root_trace_id=preallocated_root_trace_id,
|
|
|
)
|
|
)
|
|
|
else:
|
|
else:
|