Actualización del 2025-06-15 a las 15:01:05

This commit is contained in:
jlimolina 2025-06-15 15:01:05 +02:00
parent 075a438fe2
commit 273bc4e02e
2 changed files with 258 additions and 54 deletions

13
worker.py Normal file
View file

@ -0,0 +1,13 @@
import sys
import os
import logging
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
try:
from app import app, fetch_and_store
except ImportError as e:
logging.basicConfig()
logging.critical(f"No se pudo importar la aplicación Flask. Error: {e}")
sys.exit(1)
if __name__ == "__main__":
with app.app_context():
fetch_and_store()