Improve Tribute auto-renew

This commit is contained in:
Machka Pasla
2025-07-05 00:05:33 +07:00
parent 6241f766a2
commit 1e666f90d3
4 changed files with 117 additions and 0 deletions
+7
View File
@@ -32,6 +32,7 @@ from bot.handlers.admin import admin_router_aggregate
from bot.filters.admin_filter import AdminFilter
from bot.services.notification_service import schedule_subscription_notifications
from bot.services.auto_renew_service import schedule_tribute_autorenew
from bot.services.yookassa_service import YooKassaService
from bot.services.panel_api_service import PanelApiService
from bot.services.subscription_service import SubscriptionService
@@ -116,6 +117,12 @@ async def on_startup_configured(dispatcher: Dispatcher):
panel_service,
async_session_factory,
)
schedule_tribute_autorenew(
settings,
scheduler,
panel_service,
async_session_factory,
)
scheduler.start()
dispatcher["scheduler"] = scheduler
logging.info("STARTUP: APScheduler started.")