refactor: stop swallowing critical service wiring failures
This commit is contained in:
@@ -81,14 +81,12 @@ def build_core_services(
|
|||||||
api_url=settings.LKNPD_API_URL,
|
api_url=settings.LKNPD_API_URL,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Wire services that depend on each other
|
# Wire services that depend on each other. These attachments are critical
|
||||||
try:
|
# for auto-renew (subscription_service.yookassa_service) and for the panel
|
||||||
# Attach YooKassa to subscription service for auto-renew charges
|
# webhook handler's 24h pre-expiry renewal trigger; do NOT swallow errors —
|
||||||
setattr(subscription_service, "yookassa_service", yookassa_service)
|
# silent wiring failures previously caused auto-renew to disappear.
|
||||||
# Allow panel webhook to trigger renewals through subscription service
|
subscription_service.yookassa_service = yookassa_service
|
||||||
setattr(panel_webhook_service, "subscription_service", subscription_service)
|
panel_webhook_service.subscription_service = subscription_service
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"panel_service": panel_service,
|
"panel_service": panel_service,
|
||||||
|
|||||||
Reference in New Issue
Block a user