feat(product-suite): persist current generation rounds
This commit is contained in:
@@ -334,6 +334,7 @@ class ProductSuiteGenerateWorker(BaseWorker):
|
||||
job_specs,
|
||||
*,
|
||||
run_token="",
|
||||
generation_round_key=None,
|
||||
aspect_ratio="1:1",
|
||||
db_path=None,
|
||||
config=None,
|
||||
@@ -343,6 +344,7 @@ class ProductSuiteGenerateWorker(BaseWorker):
|
||||
self.project_id = int(project_id)
|
||||
self.job_specs = [dict(spec) for spec in (job_specs or [])]
|
||||
self.run_token = str(run_token or "")
|
||||
self.generation_round_key = str(generation_round_key or "").strip()
|
||||
self.aspect_ratio = str(aspect_ratio or "1:1")
|
||||
self.db_path = db_path
|
||||
self.config = config
|
||||
@@ -366,6 +368,8 @@ class ProductSuiteGenerateWorker(BaseWorker):
|
||||
prompt=spec.get("prompt") or "",
|
||||
generation_source="cmhub",
|
||||
provider="cmhub",
|
||||
generation_round_key=spec.get("generation_round_key") or self.generation_round_key or None,
|
||||
generation_slot_index=spec.get("generation_slot_index"),
|
||||
path=self.db_path,
|
||||
)
|
||||
)
|
||||
@@ -410,6 +414,7 @@ class ProductSuiteGenerateWorker(BaseWorker):
|
||||
summary["job_ids"] = list(self.job_ids)
|
||||
summary["cancelled_count"] = int(summary.get("cancelled", 0) or 0)
|
||||
summary["run_token"] = self.run_token
|
||||
summary["generation_round_key"] = self.generation_round_key or None
|
||||
return summary
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user