Skip to content

Commit

Permalink
feat: define index based on pilotID
Browse files Browse the repository at this point in the history
  • Loading branch information
martynia committed Oct 16, 2024
1 parent 070f904 commit 23e8c40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion diracx-db/src/diracx/db/os/pilot_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ class PilotLogsDB(BaseOSDB):

def index_name(self, doc_id: int) -> str:
# TODO decide how to define the index name
return f"{self.index_prefix}_0"
# use pilot ID
return f"{self.index_prefix}_{doc_id // 1e6:.0f}"

0 comments on commit 23e8c40

Please sign in to comment.