summary refs log tree commit diff
diff options
context:
space:
mode:
authorJorik Schellekens <joriks@matrix.org>2019-07-17 16:53:08 +0100
committerJorik Schellekens <joriks@matrix.org>2019-07-23 16:06:33 +0100
commitbeea2e31b948f4808ceeef631d2a49569850dfbb (patch)
tree337776aa26f77e4ea1352d73782e9b8b9b6a1069
parentUse better decorator names. (diff)
downloadsynapse-beea2e31b948f4808ceeef631d2a49569850dfbb.tar.xz
I wish python had a good type system.
-rw-r--r--synapse/storage/devices.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index 96746f6eee..4f9d440d3d 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -140,7 +140,17 @@ class DeviceWorkerStore(SQLBaseStore):
                 break
 
             key = (update[0], update[1])
-            query_map[key] = (max(query_map.get(key, 0), update[2]), update[3])
+            logger.info("++++++++++++++++++++++++ update-0 %s", update[0])
+            logger.info("++++++++++++++++++++++++ update-1 %s", update[1])
+            logger.info("++++++++++++++++++++++++ update-2 %s", update[2])
+            logger.info("++++++++++++++++++++++++ update-3 %s", update[3])
+            logger.info(
+                "+++++++++++++++++++++++++++ %s", (query_map.get(key, 0), update[2])
+            )
+            query_map[key] = (
+                max(query_map.get(key, (0, None))[0], update[2]),
+                update[3],
+            )
 
         # If we didn't find any updates with a stream_id lower than the cutoff, it
         # means that there are more than limit updates all of which have the same