Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
I wish python had a good type system.
Browse files Browse the repository at this point in the history
  • Loading branch information
JorikSchellekens committed Jul 17, 2019
1 parent 794f1e6 commit 33789fc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion synapse/storage/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,17 @@ def get_devices_by_remote(self, destination, from_stream_id, limit):
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
Expand Down

0 comments on commit 33789fc

Please sign in to comment.