fix: reduce pending payment polling rate

This commit is contained in:
Riccardo Balbo 2026-08-26 08:32:35 +00:00
commit f4b96107fa
2 changed files with 51 additions and 1 deletions

View file

@ -34,6 +34,8 @@ from .paranoia import (
)
from .permission import nwc_permissions
PAYMENT_STATUS_POLL_INTERVAL_SECONDS = 1.0
async def _check(nwc: NWCKey | None, method: str) -> dict | None:
# check
@ -122,7 +124,7 @@ async def _process_invoice(
},
"in_budget": in_budget,
}
await asyncio.sleep(0.05)
await asyncio.sleep(PAYMENT_STATUS_POLL_INTERVAL_SECONDS)
if not payment_status:
raise Exception("Payment status not found")
return {