Files
nutshell/cashu/mint
lollerfirst ff3fdd5aef feat: implement exponential backoff for paid_invoices_stream (#778)
* feat: implement exponential backoff for paid_invoices_stream across all Lightning backends

- Add exponential backoff retry logic to CLN REST, LND REST, and LND gRPC backends
- Start with 1 second delay, exponentially increase up to 5 minutes maximum
- Reset delay to 1 second on successful reconnection
- Improve error logging to include retry delay information
- Replace fixed delays with adaptive backoff to handle network issues gracefully
- Prevents system overload during persistent connection problems

Resolves issues with rapid reconnection attempts that could overwhelm Lightning nodes during network instability.

* remove unused import

* feat: extend exponential backoff to all remaining backends and invoice listener

- Implement exponential backoff in LNbits paid_invoices_stream for both SSE and WebSocket modes
- Add exponential backoff guidance comments to Blink and Strike backends (not implemented)
- Apply exponential backoff to invoice_listener in tasks.py that calls paid_invoices_stream
- Ensure consistent retry behavior across all Lightning backend integrations
- Improve system resilience during network interruptions and backend failures

All backends and the invoice listener now use the same exponential backoff strategy:
- Start with 1 second delay, exponentially increase up to 5 minutes maximum
- Reset delay to 1 second on successful reconnection
- Enhanced error logging with retry delay information

* blink + strike remove comments

* remove hardcoded values in favor of settings

* immediate first retry
2025-09-08 16:14:19 +02:00
..
2025-06-25 12:35:53 +02:00
2023-07-28 18:42:16 +02:00
2022-09-28 17:59:30 +02:00
2025-06-25 12:35:53 +02:00
2025-06-25 12:35:53 +02:00
2024-07-08 18:05:57 +02:00
2025-06-25 12:35:53 +02:00
2025-06-25 12:35:53 +02:00
2025-01-29 22:48:51 -06:00
2024-01-08 00:57:15 +01:00
2025-01-29 22:48:51 -06:00
2025-04-25 11:37:49 +02:00
2025-06-25 12:35:53 +02:00