This commit is contained in:
2025-07-21 22:07:46 +02:00
parent a4079ee089
commit a8df0f9584
2 changed files with 5 additions and 5 deletions

View File

@@ -74,8 +74,8 @@ async def worker(worker_id: int, cfg: object, pool: object) -> None:
else:
logger.info(stdout.decode().strip())
await update_status(cfg, id, DATA_ELABORATED, pool)
if not tool_elab_info["duedate"] or tool_elab_info["duedate"] in ('0000-00-00 00:00:00', '') or tool_elab_info["duedate"] > timestamp_matlab_elab:
if tool_elab_info['ftp_send']:
if not tool_elab_info["duedate"] or tool_elab_info["duedate"] in ('0000-00-00 00:00:00', '') or tool_elab_info["duedate"] > timestamp_matlab_elab:
if elab_csv := await get_data_as_csv(cfg, id, unit_name, tool_name, timestamp_matlab_elab, pool):
print(elab_csv)
#if await send_csv_to_customer(cfg, id, unit_name, tool_name, elab_csv, pool):

View File

@@ -47,7 +47,7 @@ async def get_data_as_csv(cfg: dict, id_recv: int, unit: str, tool: str, matlab_
# Creare CSV in memoria
output = StringIO()
writer = csv.writer(output, delimiter=";", lineterminator="\n", quoting=csv.QUOTE_MINIMAL)
writer = csv.writer(output, delimiter=",", lineterminator="\n", quoting=csv.QUOTE_MINIMAL)
for row in results:
writer.writerow(row)
csv_data = output.getvalue()