summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-08-06 08:30:06 -0400
committerGitHub <noreply@github.com>2020-08-06 08:30:06 -0400
commitd4a7829b12197faf52eb487c443ee09acafeb37e (patch)
treecab5f15a7532596153f61b47aafcf4cb4a4b7d45 /synapse/storage
parentConvert run_as_background_process inner function to async. (#8032) (diff)
downloadsynapse-d4a7829b12197faf52eb487c443ee09acafeb37e.tar.xz
Convert synapse.api to async/await (#8031)
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/databases/main/client_ips.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/storage/databases/main/client_ips.py b/synapse/storage/databases/main/client_ips.py
index 712c8d0264..50d71f5ebc 100644
--- a/synapse/storage/databases/main/client_ips.py
+++ b/synapse/storage/databases/main/client_ips.py
@@ -380,8 +380,7 @@ class ClientIpStore(ClientIpBackgroundUpdateStore):
         if self.user_ips_max_age:
             self._clock.looping_call(self._prune_old_user_ips, 5 * 1000)
 
-    @defer.inlineCallbacks
-    def insert_client_ip(
+    async def insert_client_ip(
         self, user_id, access_token, ip, user_agent, device_id, now=None
     ):
         if not now:
@@ -392,7 +391,7 @@ class ClientIpStore(ClientIpBackgroundUpdateStore):
             last_seen = self.client_ip_last_seen.get(key)
         except KeyError:
             last_seen = None
-        yield self.populate_monthly_active_users(user_id)
+        await self.populate_monthly_active_users(user_id)
         # Rate-limited inserts
         if last_seen is not None and (now - last_seen) < LAST_SEEN_GRANULARITY:
             return