From 5bca9bca33f36cc26c851d3e80f22da59211e63e Mon Sep 17 00:00:00 2001 From: Conatum Date: Wed, 23 Aug 2023 09:45:50 +0300 Subject: [PATCH] fix (analytics): Fix typo in snapshot. --- src/analytics/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/analytics/server.py b/src/analytics/server.py index 94d4e3c6..887d10c6 100644 --- a/src/analytics/server.py +++ b/src/analytics/server.py @@ -68,7 +68,7 @@ class AnalyticsServer: # Make sure everyone sent results and there were no exceptions (e.g. concurrency) failed = not isinstance(results, dict) - failed = failed or not any( + failed = failed or any( result is None or isinstance(result, Exception) for result in results.values() ) if failed: @@ -80,6 +80,8 @@ class AnalyticsServer: ) return False + logger.debug(f"Creating snapshot from: {results}") + # Now we have a dictionary of shard snapshots, aggregate, pull in remaining data, and store. # TODO Possibly move this out into snapshots.py? aggregate = {field: 0 for field in ShardSnapshot._fields}