Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle hodl invoices asynchronously tasks.py #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

santyr
Copy link

@santyr santyr commented Jul 16, 2024

  • Modified the on_invoice_paid function to call pay_invoice asynchronously using asyncio.create_task.
  • Added a new function pay_invoice_in_background to handle the asynchronous payment processing and exception handling.
  • Ensured that the main event loop remains responsive even when encountering hodl invoices by running pay_invoice in the background.

- Modified the on_invoice_paid function to call pay_invoice asynchronously using asyncio.create_task.
- Added a new function pay_invoice_in_background to handle the asynchronous payment processing and exception handling.
- Ensured that the main event loop remains responsive even when encountering hodl invoices by running pay_invoice in the background.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant