Skip to content

Commit

Permalink
better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sanni-t committed Apr 12, 2024
1 parent 4f8c39d commit c191867
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,12 @@ async def add(self, completed_analysis_resource: CompletedAnalysisResource) -> N
)

def _make_room_for_new_analysis(self, protocol_id: str) -> None:
"""Remove the oldest analysis in store if the number of analyses exceed the max allowed.
"""Remove the oldest analyses in store if the number of analyses exceed the max allowed.
Unlike protocols, a protocol analysis IDs are not stored by any DB entities
Unlike protocols, protocol analysis IDs are not stored by any DB entities
other than the analysis store itself. So we do not have to worry about cleaning up
any other tables,
any other tables.
"""
# Get length of analyses list for this protocol
analyses_ids = self.get_ids_by_protocol(protocol_id)

# Delete all analyses exceeding max number allowed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ async def test_add_makes_room_for_new_analysis(
"""It should delete old analyses and make room for new analysis."""
protocol_store.insert(make_dummy_protocol_resource("protocol-id"))

# Set up the database with extra analyses
# Set up the database with existing analyses
resources = [
_completed_analysis_resource(
analysis_id=analysis_id,
Expand Down

0 comments on commit c191867

Please sign in to comment.