Fix MinioStorage.upload_file → .upload + suppress instant delivery during eSign pause
- 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) <noreply@anthropic.com>
This commit is contained in:
parent
ff47f47a37
commit
9ca6094984
5 changed files with 7 additions and 7 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue