Refactor: streamline core service and clean workspace
This commit is contained in:
12
dashboard.py
12
dashboard.py
@@ -5,9 +5,8 @@ Interfaz web simple para reprocesar archivos MP3 con 1 click
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
import logging
|
||||
import subprocess
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import List, Dict, Any
|
||||
@@ -15,9 +14,10 @@ from typing import List, Dict, Any
|
||||
from flask import Flask, render_template, request, jsonify, send_from_directory
|
||||
from flask_cors import CORS
|
||||
|
||||
# Importar configuraciones del main.py
|
||||
import sys
|
||||
sys.path.append('/home/ren/cbc')
|
||||
# Importar configuraciones del main.py sin rutas absolutas
|
||||
PROJECT_ROOT = Path(__file__).resolve().parent
|
||||
if str(PROJECT_ROOT) not in sys.path:
|
||||
sys.path.append(str(PROJECT_ROOT))
|
||||
from main import (
|
||||
AUDIO_EXTENSIONS, LOCAL_DOWNLOADS_PATH, PROCESSED_FILES_PATH,
|
||||
load_processed_files, save_processed_file, process_audio_file,
|
||||
@@ -414,4 +414,4 @@ if __name__ == '__main__':
|
||||
logger.info("🛑 Dashboard detenido por el usuario")
|
||||
except Exception as e:
|
||||
logger.error(f"❌ Error en dashboard: {e}")
|
||||
raise
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user