Skip to content

Commit

Permalink
Database: Restrict index creation to one worker.
Browse files Browse the repository at this point in the history
  • Loading branch information
xsedla1o committed Jul 12, 2024
1 parent c00b8bf commit fed2dad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dp3/database/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def __init__(

# Init and switch to correct database
self._db = self._db[config.db_name]
self._init_database_schema(config.db_name)
if process_index == 0:
self._init_database_schema(config.db_name)

self.schema_cleaner = SchemaCleaner(
self._db, self.get_module_cache("Schema"), self._db_schema_config, self.log
Expand Down

0 comments on commit fed2dad

Please sign in to comment.