Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions controller/breeder_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ def create_breeder(self, breeder_config, name):
targets_count = len(targets)
is_cooperative = breeder_config.get('cooperation', {}).get('active', False)

# Ensure metadata table exists before querying it (idempotent check)
self.metadata_repo.create_table()

# Check if a breeder with this name already exists.
# If it does, return the existing breeder instead of creating a duplicate
# and dispatching duplicate workers.
Expand Down Expand Up @@ -482,12 +485,6 @@ def create_breeder(self, breeder_config, name):
meta_state=breeder_config
)

# Create detection_rounds table and insert a round for this breeder.
# Each breeder gets a round as sender — breeders coordinate through
# this table: sender impulses, receivers hold still.
self.archive_repo.ensure_detection_rounds_table()
self.archive_repo.insert_detection_round(sender_id=breeder_uuid)

# Launch worker scripts with error handling
worker_launch_failures = []
target_count = 0
Expand Down
Loading