mirror of
https://github.com/autistic-symposium/blockchain-data-engineering-toolkit.git
synced 2025-05-05 08:15:08 -04:00
add libraries and clean up
This commit is contained in:
parent
10fde4b2fc
commit
6fd3fe78cb
1 changed files with 1 additions and 3 deletions
|
@ -44,9 +44,7 @@ async def retrieve_top_balances(top_number: int, env_vars: dict) -> list:
|
||||||
"""Retrieve top balances from the database."""
|
"""Retrieve top balances from the database."""
|
||||||
|
|
||||||
collection = _get_db_collection(env_vars)
|
collection = _get_db_collection(env_vars)
|
||||||
# todo: need to sort? how to optimzie to not return all?
|
top_balances = collection.find().sort({"balance": {"$lt": top_number}}, pymongo.DESCENDING)
|
||||||
# something like for post in posts.find({"date": {"$lt": d}}).sort("author"):
|
|
||||||
top_balances = collection.find()
|
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
counter = 0
|
counter = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue