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