[perf] pending payments check (#3565)

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Vlad Stan
2025-11-25 14:09:57 +02:00
committed by GitHub
co-authored by dni ⚡
parent 33e2fc2ea8
commit 0910687328
8 changed files with 74 additions and 30 deletions
+6
View File
@@ -179,12 +179,18 @@ async def api_payments_daily_stats(
)
async def api_payments_paginated(
key_info: WalletTypeInfo = Depends(require_invoice_key),
recheck_pending: bool = Query(
False, description="Force check and update of pending payments."
),
filters: Filters = Depends(parse_filters(PaymentFilters)),
):
page = await get_payments_paginated(
wallet_id=key_info.wallet.id,
filters=filters,
)
if not recheck_pending:
return page
for payment in page.data:
if payment.pending:
await update_pending_payment(payment)