summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-03 11:06:29 +0000
committerErik Johnston <erik@matrix.org>2016-02-03 11:06:29 +0000
commit6f52e90065243682d93e5f89b071e1fb056fa6ab (patch)
tree98b9c43dd42dbc3d14a96f1b81e0631c7ac271c9 /synapse/storage/_base.py
parentUnused import (diff)
parentMerge pull request #553 from matrix-org/daniel/accesstokenlogging (diff)
downloadsynapse-6f52e90065243682d93e5f89b071e1fb056fa6ab.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/public_room_fix
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 5e77320540..cfb87d9328 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -185,7 +185,7 @@ class SQLBaseStore(object):
             time_then = self._previous_loop_ts
             self._previous_loop_ts = time_now
 
-            ratio = (curr - prev)/(time_now - time_then)
+            ratio = (curr - prev) / (time_now - time_then)
 
             top_three_counters = self._txn_perf_counters.interval(
                 time_now - time_then, limit=3
@@ -643,7 +643,10 @@ class SQLBaseStore(object):
         if not iterable:
             defer.returnValue(results)
 
-        chunks = [iterable[i:i+batch_size] for i in xrange(0, len(iterable), batch_size)]
+        chunks = [
+            iterable[i:i + batch_size]
+            for i in xrange(0, len(iterable), batch_size)
+        ]
         for chunk in chunks:
             rows = yield self.runInteraction(
                 desc,