refactory old scripts

This commit is contained in:
2025-10-11 22:31:54 +02:00
parent 0f91cf1fd4
commit 1cbc619942
23 changed files with 2615 additions and 54 deletions

View File

@@ -1,3 +1,4 @@
"""Config ini setting"""
from pathlib import Path
ENV_PARENT_PATH = Path(__file__).resolve().parent.parent.parent.parent
ENV_PARENT_PATH = Path(__file__).resolve().parent.parent.parent.parent

View File

@@ -580,7 +580,7 @@ async def _send_elab_data_api(cfg: dict, id: int, unit_name: str, tool_name: str
if not elab_csv:
return False
print(elab_csv)
logger.debug(f"id {id} - {unit_name} - {tool_name}: CSV elaborato pronto per invio API (size: {len(elab_csv)} bytes)")
# if await send_elab_csv_to_customer(cfg, id, unit_name, tool_name, elab_csv, pool):
if True: # Placeholder per test
return True

View File

@@ -66,7 +66,7 @@ async def ftp_SITE_ADDU_async(self: object, line: str) -> None:
conn = await connetti_db_async(cfg)
except Exception as e:
logger.error(f"Database connection error: {e}")
self.respond(f"501 SITE ADDU failed: Database error")
self.respond("501 SITE ADDU failed: Database error")
return
try:

View File

@@ -145,7 +145,7 @@ async def run_orchestrator(
timeout=30.0, # Grace period for workers to finish
)
logger.info("Tutti i worker terminati correttamente")
except asyncio.TimeoutError:
except TimeoutError:
logger.warning("Timeout raggiunto. Alcuni worker potrebbero non essere terminati correttamente")
except KeyboardInterrupt: