#!/usr/bin/env python3 """One-time script to collect results from completed chunks""" import sys sys.path.insert(0, '.') from distributed_coordinator import DistributedCoordinator completed_chunks = { 'worker1': ['v9_chunk_000006', 'v9_chunk_000008'], 'worker2': ['v9_chunk_000000', 'v9_chunk_000007', 'v9_chunk_000009'] } coordinator = DistributedCoordinator() for worker_id, chunks in completed_chunks.items(): for chunk_id in chunks: print(f"šŸ“„ Collecting {chunk_id} from {worker_id}...") try: coordinator.collect_results(worker_id, chunk_id) print(f"āœ… Successfully collected {chunk_id}") except Exception as e: print(f"āš ļø Error collecting {chunk_id}: {e}") print("\nāœ… Collection complete!")