fix(delivery): initialize broker client before probe deadline

This commit is contained in:
2026-10-24 03:22:54 +08:00
parent 278337dd46
commit c54d989fc7
+6
View File
@@ -7,6 +7,7 @@ import logging
import os import os
import subprocess import subprocess
import urllib.request import urllib.request
from importlib import import_module
from pathlib import Path from pathlib import Path
from uuid import UUID from uuid import UUID
@@ -615,6 +616,11 @@ def observe(*, probe: bool) -> dict:
errors.append("factory_status_unavailable") errors.append("factory_status_unavailable")
if probe: if probe:
try: try:
# Blocking module initialization belongs to the fixed 300-second
# helper budget. Load the packaged client before starting the
# cancellable six-second network operation.
import_module("aio_pika")
import_module("pamqp.commands")
value = fields( value = fields(
http( http(
"http://127.0.0.1:8100/internal/operations/probe-id", "http://127.0.0.1:8100/internal/operations/probe-id",