refactor: Substitui APScheduler por asyncio nativo para OCP
- Remove dependência apscheduler - Implementa loop asyncio com sleep calculado - Compatível com ambientes sem cron (OCP/Kubernetes) - Documenta solução em SCHEDULER.md
This commit is contained in:
@@ -20,8 +20,7 @@ async def lifespan(app: FastAPI):
|
||||
try:
|
||||
job = get_processar_job()
|
||||
scheduler = RankingScheduler(job)
|
||||
scheduler.iniciar()
|
||||
print("Scheduler do ranking iniciado: job rodará diariamente às 3h")
|
||||
await scheduler.iniciar()
|
||||
except Exception as e:
|
||||
print(f"AVISO: Scheduler não iniciou: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user