Avinashnalla7 commited on
Commit
7dbd13e
·
1 Parent(s): 3ed1c08

Hotfix: send-config fast-return via env flag (keep __future__ first)

Browse files
Files changed (1) hide show
  1. backend/api.py +7 -0
backend/api.py CHANGED
@@ -1,5 +1,9 @@
1
  from __future__ import annotations
2
 
 
 
 
 
3
  from backend.sftp_store import store_to_sftp
4
  import json
5
  import os
@@ -121,6 +125,9 @@ async def put_pdf(pdf_id: str, file: UploadFile = File(...), pdf_name: str = For
121
 
122
  @app.post("/api/send-config")
123
  async def send_config(request: Request):
 
 
 
124
  """
125
  Store config JSON for later pipelines.
126
  Do NOT require PDF to exist.
 
1
  from __future__ import annotations
2
 
3
+ import os
4
+ SENDCFG_FAST_OK=(os.getenv("SENDCFG_FAST_OK","0")=="1")
5
+
6
+
7
  from backend.sftp_store import store_to_sftp
8
  import json
9
  import os
 
125
 
126
  @app.post("/api/send-config")
127
  async def send_config(request: Request):
128
+ if SENDCFG_FAST_OK:
129
+ return {"ok": True, "mode": "fast"}
130
+
131
  """
132
  Store config JSON for later pipelines.
133
  Do NOT require PDF to exist.