Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Sep 25, 2019
1 parent f8b02c5 commit 39b50ad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ redaction_retention_period: 7d

# How long to track users' last seen time and IPs in the database.
#
# Defaults to `28d`. Set to `null` to disable.
# Defaults to `28d`. Set to `null` to disable clearing out of old rows.
#
#user_ips_max_age: 14d

Expand Down
2 changes: 1 addition & 1 deletion synapse/config/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ def generate_config_section(
# How long to track users' last seen time and IPs in the database.
#
# Defaults to `28d`. Set to `null` to disable.
# Defaults to `28d`. Set to `null` to disable clearing out of old rows.
#
#user_ips_max_age: 14d
"""
Expand Down
5 changes: 1 addition & 4 deletions synapse/storage/background_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,8 @@ def has_completed_background_updates(self):

return False

async def has_completed_background_update(self, update_name):
async def has_completed_background_update(self, update_name) -> bool:
"""Check if the given background update has finished running.
Returns:
Deferred[bool]
"""

if self._all_done:
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/client_ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ async def _prune_old_user_ips(self):
"""Removes entries in user IPs older than the configured period.
"""

if not self.user_ips_max_age:
if self.user_ips_max_age is None:
# Nothing to do
return

Expand Down

0 comments on commit 39b50ad

Please sign in to comment.