We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4a288e commit 5f6bf70Copy full SHA for 5f6bf70
app/routes.py
@@ -19,7 +19,7 @@
19
latest_transactions = queue.Queue(maxsize=100) # Keep last 100 transactions
20
21
def handle_new_transaction(tx):
22
- if latest_transactions.full():
+ if len(latest_transactions) >= 30:
23
latest_transactions.get() # Remove oldest transaction if queue is full
24
latest_transactions.put(tx)
25
0 commit comments