chore: quitar rutas absolutas del codigo
Los scrapers y el analizador de imagenes llevaban cableada la ruta de despliegue de una maquina concreta. Ahora sale de una variable de entorno y, si no esta, se deduce de la ubicacion del propio fichero: el repo funciona donde lo clones sin editar nada. FLUJOS_DATOS_DIR raiz de datos para scrapers y comparacion FLUJOS_NOTICIAS_DIR scraper historico de medios HF_HOME cache de modelos de Hugging Face flujos-pipeline.service pasa a plantilla, igual que las de coconews.
This commit is contained in:
parent
710904a1ef
commit
e2b1f27699
12 changed files with 175 additions and 6682 deletions
|
|
@ -5,15 +5,15 @@ Requires=mongod.service
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=capitansito
|
||||
WorkingDirectory=/var/www/theflows.net/flujos/FLUJOS_DATOS
|
||||
User=__USER__
|
||||
WorkingDirectory=__INSTALL_DIR__/FLUJOS_DATOS
|
||||
|
||||
Environment=MONGO_URL=mongodb://localhost:27017
|
||||
Environment=DB_NAME=FLUJOS_DATOS
|
||||
Environment=HF_HOME=/var/www/theflows.net/flujos/FLUJOS_DATOS/IMAGENES/model_cache
|
||||
Environment=HF_HOME=__INSTALL_DIR__/FLUJOS_DATOS/IMAGENES/model_cache
|
||||
|
||||
ExecStart=/var/www/theflows.net/flujos/FLUJOS_DATOS/myenv/bin/python3 \
|
||||
/var/www/theflows.net/flujos/FLUJOS_DATOS/pipeline_maestro.py
|
||||
ExecStart=__INSTALL_DIR__/FLUJOS_DATOS/myenv/bin/python3 \
|
||||
__INSTALL_DIR__/FLUJOS_DATOS/pipeline_maestro.py
|
||||
|
||||
# 12h máximo (análisis VLM en CPU puede tardar)
|
||||
TimeoutStartSec=43200
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
[Unit]
|
||||
Description=Ejecutar FLUJOS Pipeline cada semana (domingo 3am)
|
||||
Description=Ejecutar FLUJOS Pipeline cada 12 horas
|
||||
Requires=flujos-pipeline.service
|
||||
|
||||
[Timer]
|
||||
# Todos los domingos a las 03:00
|
||||
OnCalendar=Sun *-*-* 03:00:00
|
||||
# Cada 12 horas: a las 00:00 y 12:00
|
||||
OnCalendar=*-*-* 00,12:00:00
|
||||
|
||||
# Si el servidor estaba apagado a las 3am, ejecutar al arrancar
|
||||
Persistent=true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue