refactor: Rename IPSExtractor to Flujo IPS across the project. Update titles, descriptions, and labels in the API, desktop application, and documentation to reflect the new branding. Introduce a new .gitignore for CodeGraph data files and adjust existing .gitignore to include specific directories. Enhance the desktop application with new components for displaying bot progress and results.
This commit is contained in:
@@ -175,3 +175,48 @@ def test_list_jobs_by_parent(store):
|
||||
listed = job_store.list_jobs(limit=50, job_id="parent-1")
|
||||
assert len(listed) == 1
|
||||
assert listed[0].id == a.id
|
||||
|
||||
|
||||
def test_distributed_parent_reports_live_processed_total(store):
|
||||
job_store, JobStatus, _WorkerStatus = store
|
||||
parent = job_store.create_job(
|
||||
None,
|
||||
"uploads/parent/input.xlsx",
|
||||
"input.xlsx",
|
||||
shard_count=2,
|
||||
result={"total_rows": 10, "processed": 0},
|
||||
status=JobStatus.PENDING.value,
|
||||
)
|
||||
first = job_store.create_job(
|
||||
"PC-01",
|
||||
"uploads/first/input.xlsx",
|
||||
parent_download_job_id=parent.id,
|
||||
shard_index=0,
|
||||
shard_count=2,
|
||||
result={"total": 5, "processed": 2},
|
||||
status=JobStatus.RUNNING.value,
|
||||
)
|
||||
second = job_store.create_job(
|
||||
"PC-02",
|
||||
"uploads/second/input.xlsx",
|
||||
parent_download_job_id=parent.id,
|
||||
shard_index=1,
|
||||
shard_count=2,
|
||||
result={"total": 5, "processed": 0},
|
||||
status=JobStatus.PENDING.value,
|
||||
)
|
||||
|
||||
live = job_store.refresh_parent_from_shards(parent.id)
|
||||
assert live is not None
|
||||
assert live.result["processed"] == 2
|
||||
assert live.result["total"] == 10
|
||||
|
||||
job_store.patch_job(
|
||||
first.id,
|
||||
status=JobStatus.COMPLETED.value,
|
||||
result={"total": 5, "exitosos": 3, "fallidos": 2},
|
||||
)
|
||||
job_store.patch_job(second.id, result={"total": 5, "processed": 1})
|
||||
live = job_store.refresh_parent_from_shards(parent.id)
|
||||
assert live is not None
|
||||
assert live.result["processed"] == 6
|
||||
|
||||
Reference in New Issue
Block a user