feat: implement granular real-time logging, batch processing, and multi-key API rotation

This commit is contained in:
Nubenetes Bot
2026-05-14 17:21:52 +02:00
parent a788992459
commit 42d7da9e8b
7 changed files with 383 additions and 171 deletions

53
.github/workflows/agentic_backup.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: Nubenetes Backup-based Curation
on:
workflow_dispatch:
inputs:
backup_file:
description: 'Ruta al fichero de backup (JSON o MD) dentro del repositorio'
required: true
default: 'data/backup_posts.json'
historical_mode:
description: 'Activar Modo Histórico (Ignora fecha de 30 días)'
required: false
default: 'true'
type: boolean
permissions:
contents: write
pull-requests: write
jobs:
backup-curation-process:
runs-on: ubuntu-latest
steps:
- name: Sincronización del repositorio
uses: actions/checkout@v4
- name: Provisión del Entorno Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Instalación de dependencias
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir pydantic PyGithub aiohttp beautifulsoup4 httpx fake-useragent pytz python-dotenv twikit>=2.1.2 playwright playwright-stealth
# Playwright es necesario porque el evaluador de Gemini o el curator podrían usarlo indirectamente,
# aunque para la extracción del backup no sea estrictamente necesario.
playwright install chromium --with-deps
- name: Ejecución de la Canalización Agéntica (Modo Backup)
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BACKUP_FILE: ${{ github.event.inputs.backup_file }}
HISTORICAL_MODE: ${{ github.event.inputs.historical_mode }}
PYTHONPATH: .
run: |
if [ ! -f "$BACKUP_FILE" ]; then
echo "❌ ERROR: El archivo '$BACKUP_FILE' no se encuentra en el repositorio."
echo "Por favor, sube el archivo a esa ruta y vuelve a intentarlo."
exit 1
fi
python src/main.py