From 9ca60949848d6bca7eb5a7df751afc77bc94294e Mon Sep 17 00:00:00 2001 From: justin Date: Mon, 4 May 2026 10:59:45 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20MinioStorage.upload=5Ffile=20=E2=86=92=20?= =?UTF-8?q?.upload=20+=20suppress=20instant=20delivery=20during=20eSign=20?= =?UTF-8?q?pause?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - upload_file doesn't exist on MinioStorage — the method is upload() - Return [] when pausing for eSign so job_server doesn't trigger instant delivery Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/workers/services/calea_ssi.py | 4 ++-- scripts/workers/services/cpni_certification.py | 4 ++-- scripts/workers/services/dc_agent.py | 2 +- scripts/workers/services/form_499a.py | 2 +- scripts/workers/services/rmd_filing.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/workers/services/calea_ssi.py b/scripts/workers/services/calea_ssi.py index 481f913..72db7f0 100644 --- a/scripts/workers/services/calea_ssi.py +++ b/scripts/workers/services/calea_ssi.py @@ -178,7 +178,7 @@ class CALEASSIHandler(BaseServiceHandler): if path.endswith(".pdf"): remote = f"compliance/{order_number}/{os.path.basename(path)}" try: - storage.upload_file(path, remote) + storage.upload(path, remote) pdf_minio_key = remote except Exception as exc: logger.warning("MinIO upload failed for %s: %s", path, exc) @@ -205,7 +205,7 @@ class CALEASSIHandler(BaseServiceHandler): logger.warning("Could not create CALEA eSign record: %s", exc) logger.info("CALEASSIHandler: paused for client eSign — order %s", order_number) - return generated + return [] # Don't return files — prevents instant delivery before signing # Persist + schedule annual review if entity_id: diff --git a/scripts/workers/services/cpni_certification.py b/scripts/workers/services/cpni_certification.py index cc38e2f..fcc3d49 100644 --- a/scripts/workers/services/cpni_certification.py +++ b/scripts/workers/services/cpni_certification.py @@ -201,7 +201,7 @@ class CPNIFilingHandler(BaseServiceHandler): if path.endswith(".pdf") and "certification" in path.lower(): remote = f"compliance/{order_number}/{os.path.basename(path)}" try: - storage.upload_file(path, remote) + storage.upload(path, remote) pdf_minio_key = remote except Exception as exc: logger.warning("MinIO upload failed for %s: %s", path, exc) @@ -229,7 +229,7 @@ class CPNIFilingHandler(BaseServiceHandler): logger.warning("Could not create CPNI eSign record: %s", exc) logger.info("CPNIFilingHandler: paused for client eSign — order %s", order_number) - return generated + return [] # Don't return files — prevents instant delivery before signing # ── 2b. Auto-filing toggle ────────────────────────────────────── decision = check_auto_filing(order_data) diff --git a/scripts/workers/services/dc_agent.py b/scripts/workers/services/dc_agent.py index 39d4a95..37c172b 100644 --- a/scripts/workers/services/dc_agent.py +++ b/scripts/workers/services/dc_agent.py @@ -69,7 +69,7 @@ class DCAgentHandler(BaseServiceHandler): from scripts.document_gen import MinioStorage storage = MinioStorage() minio_key = f"compliance/{order_number}/dc_agent_acceptance.pdf" - storage.upload_file(pdf_path or acceptance, minio_key) + storage.upload(pdf_path or acceptance, minio_key) minio_path = minio_key logger.info("DCAgentHandler: acceptance letter uploaded to %s", minio_key) except Exception as exc: diff --git a/scripts/workers/services/form_499a.py b/scripts/workers/services/form_499a.py index 6b9be32..e6d92e0 100644 --- a/scripts/workers/services/form_499a.py +++ b/scripts/workers/services/form_499a.py @@ -1528,7 +1528,7 @@ class Form499AHandler(BaseServiceHandler): from scripts.document_gen import MinioStorage storage = MinioStorage() minio_key = f"engagement/{order_number}/engagement_letter.pdf" - storage.upload_file(pdf_path or docx_path, minio_key) + storage.upload(pdf_path or docx_path, minio_key) # Update order with engagement letter path + mark eSign required try: diff --git a/scripts/workers/services/rmd_filing.py b/scripts/workers/services/rmd_filing.py index d7d9498..f0f13cf 100644 --- a/scripts/workers/services/rmd_filing.py +++ b/scripts/workers/services/rmd_filing.py @@ -91,7 +91,7 @@ class RMDFilingHandler(BaseServiceHandler): if path.endswith(".pdf"): remote = f"compliance/{order_number}/{os.path.basename(path)}" try: - storage.upload_file(path, remote) + storage.upload(path, remote) minio_paths.append(remote) except Exception as exc: logger.warning("MinIO upload failed for %s: %s", path, exc)