From 87cf610891a552f6579efc776a0dca2ec22beecb Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 06:05:48 +0000 Subject: [PATCH] feat: add script to start promotion deployment daemon - Created `scripts/iniciar_automatizacion.sh` to initialize the directory structure (`promociones/`, `promociones_procesadas/`, `promociones_fallidas/`) and run `daemon_promociones.py` in unattended background mode. - Updated `.gitignore` to exclude generated folders and daemon logs. Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com> --- .gitignore | 6 ++++++ scripts/iniciar_automatizacion.sh | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 scripts/iniciar_automatizacion.sh diff --git a/.gitignore b/.gitignore index 7b2cfc3fa2..67c5d0d305 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,9 @@ Brewfile.lock.json examples/*.mp3 promotions.log + +# Automatizacion promociones +promociones/ +promociones_procesadas/ +promociones_fallidas/ +daemon_promociones.log diff --git a/scripts/iniciar_automatizacion.sh b/scripts/iniciar_automatizacion.sh new file mode 100755 index 0000000000..67cce6926d --- /dev/null +++ b/scripts/iniciar_automatizacion.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Script para iniciar la automatización de publicaciones de promociones + +# Directorio base +BASE_DIR=$(pwd) + +# Crear los directorios requeridos +mkdir -p "$BASE_DIR/promociones" +mkdir -p "$BASE_DIR/promociones_procesadas" +mkdir -p "$BASE_DIR/promociones_fallidas" + +echo "Iniciando automatización de promociones..." + +# Ejecutar el daemon en segundo plano (desatendido) +nohup python3 -u scripts/daemon_promociones.py > daemon_promociones.log 2>&1 & + +PID=$! +echo "Daemon de promociones iniciado con PID $PID." +echo "Los logs se están guardando en daemon_promociones.log." +echo "Deposita tus archivos JSON en la carpeta promociones/ para su despliegue automático."