File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+
12import uuid
23import threading
34import time
1516from .temp_manager import (
1617 ensure_temp_dir , write_to_temp , delete_from_temp , cleanup_on_startup
1718)
18- from .ml_stub import run_ml
1919from .minio_client import ensure_bucket , upload_to_minio
2020from .logger import get_logger
2121
@@ -184,11 +184,7 @@ async def upload_file(file: UploadFile = File(...), db: Session = Depends(get_db
184184 temp_path = write_to_temp (file_bytes , file .filename )
185185 logger .info (f"Temp file written — path={ temp_path } " , extra = {"status" : "success" })
186186
187- # Step 4 — ML stub + MinIO
188- logger .info ("ML stub invoked" , extra = {"status" : "called" })
189- run_ml (temp_path )
190- logger .info ("ML stub complete" , extra = {"status" : "success" })
191-
187+ # Step 4 — MinIO upload (ML handled by agents pipeline)
192188 object_name = f"{ uuid .uuid4 ().hex } .{ ext } "
193189 minio_object = upload_to_minio (temp_path , object_name )
194190 logger .info (
@@ -231,4 +227,4 @@ def _run_agents():
231227 filename = file .filename ,
232228 size_mb = size_mb ,
233229 minio_object = minio_object ,
234- )
230+ )
You can’t perform that action at this time.
0 commit comments