entre semana
This commit is contained in:
@ -55,7 +55,7 @@ def cargar_tareas_desde_csv(indices):
|
||||
for hora in range(horaInicio.hour, horaFin.hour + 1):
|
||||
scheduler.add_job(
|
||||
search_indice,
|
||||
trigger=CronTrigger(hour=hora, minute=0, day="*"),
|
||||
trigger=CronTrigger(hour=hora, minute=0, day_of_week="0-4"),
|
||||
args=[obj]
|
||||
)
|
||||
logging.info(f"✅ Tarea agregada para {nombre} a las {hora}:00")
|
||||
@ -68,7 +68,7 @@ def cargar_tareas_desde_csv(indices):
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
scheduler.start()
|
||||
scheduler.start(paused=False)
|
||||
yield
|
||||
scheduler.shutdown()
|
||||
|
||||
|
@ -4,6 +4,7 @@ services:
|
||||
context: ./app
|
||||
dockerfile: Dockerfile
|
||||
container_name: fastapi-app
|
||||
restart: always
|
||||
ports:
|
||||
- "8003:8000"
|
||||
environment:
|
||||
|
Reference in New Issue
Block a user