fix (analytics): Fix typo in snapshot.

This commit is contained in:
2023-08-23 09:45:50 +03:00
parent 4e8cba2037
commit 5bca9bca33

View File

@@ -68,7 +68,7 @@ class AnalyticsServer:
# Make sure everyone sent results and there were no exceptions (e.g. concurrency) # Make sure everyone sent results and there were no exceptions (e.g. concurrency)
failed = not isinstance(results, dict) 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() result is None or isinstance(result, Exception) for result in results.values()
) )
if failed: if failed:
@@ -80,6 +80,8 @@ class AnalyticsServer:
) )
return False return False
logger.debug(f"Creating snapshot from: {results}")
# Now we have a dictionary of shard snapshots, aggregate, pull in remaining data, and store. # Now we have a dictionary of shard snapshots, aggregate, pull in remaining data, and store.
# TODO Possibly move this out into snapshots.py? # TODO Possibly move this out into snapshots.py?
aggregate = {field: 0 for field in ShardSnapshot._fields} aggregate = {field: 0 for field in ShardSnapshot._fields}