Перенесены секреты из .env в SM
This commit is contained in:
@@ -766,7 +766,7 @@ def create_app(settings: Settings | None = None) -> FastAPI:
|
||||
timeout=cfg.bitrix_http_timeout_sec,
|
||||
)
|
||||
except Exception as exc:
|
||||
logger.exception(
|
||||
logger.error(
|
||||
"outbound delivery failed",
|
||||
extra={
|
||||
"request_id": request.state.request_id,
|
||||
@@ -1153,8 +1153,11 @@ async def worker_loop(app: FastAPI, kind: str) -> None:
|
||||
await process_outbound(app)
|
||||
else:
|
||||
await process_setup(app)
|
||||
except Exception:
|
||||
logger.exception("worker iteration failed", extra={"worker_kind": kind})
|
||||
except Exception as exc:
|
||||
logger.error(
|
||||
"worker iteration failed",
|
||||
extra={"worker_kind": kind, "error_type": type(exc).__name__},
|
||||
)
|
||||
try:
|
||||
await asyncio.wait_for(app.state.stop.wait(), app.state.settings.bitrix_worker_poll_sec)
|
||||
except TimeoutError:
|
||||
@@ -1197,7 +1200,7 @@ async def process_inbox(app: FastAPI) -> None:
|
||||
)
|
||||
await session.commit()
|
||||
except Exception as exc:
|
||||
logger.exception(
|
||||
logger.error(
|
||||
"inbound forward failed",
|
||||
extra={
|
||||
"inbox_id": str(row.id),
|
||||
@@ -1275,7 +1278,7 @@ async def process_outbound(app: FastAPI) -> None:
|
||||
timeout=app.state.settings.bitrix_http_timeout_sec,
|
||||
)
|
||||
except Exception as exc:
|
||||
logger.exception(
|
||||
logger.error(
|
||||
"outbound retry failed",
|
||||
extra={
|
||||
"outbound_id": str(row.id),
|
||||
|
||||
Reference in New Issue
Block a user