refactory old scripts
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user