Backend- file ingestion API Updates
This commit is contained in:
@@ -94,6 +94,25 @@ class BrandConfig(Config):
|
||||
max_products_per_brand: Optional[int] = None
|
||||
|
||||
|
||||
class BatchConfig(Config):
|
||||
"""Per-run config for the uploaded-spreadsheet batch job.
|
||||
|
||||
`batch_id` selects a batch staged under BATCH_UPLOAD_DIR by the API. Left
|
||||
empty, the job picks the oldest batch still queued, which is what the
|
||||
sensor wants and what makes a manual "run it now" from the Launchpad
|
||||
convenient.
|
||||
|
||||
The two network flags default OFF for the same reason they do on
|
||||
BrandConfig, with more force: a batch is up to twenty files, so leaving
|
||||
image search on would fire tens of thousands of outbound requests from one
|
||||
run.
|
||||
"""
|
||||
|
||||
batch_id: Optional[str] = None
|
||||
use_llm: bool = False
|
||||
fetch_images: bool = False
|
||||
|
||||
|
||||
def resolve_brands(cfg_brands: Optional[List[str]]) -> List[str]:
|
||||
"""Run config wins; otherwise ACTIVE_BRANDS; otherwise whatever the DB has.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user