Skip to content

feat: handle hodl invoices asynchronously tasks.py #25

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

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

santyr
Copy link
Contributor

@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.

@dni
Copy link
Member

dni commented Nov 29, 2024

i think hold invoices could also be handled more generel inside the pay_invoice service. what do you think @motorina0

@motorina0
Copy link
Collaborator

CI fails for lint

- 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.
@dni dni changed the title Handle hodl invoices asynchronously tasks.py feat: handle hodl invoices asynchronously tasks.py Feb 26, 2025
@dni dni merged commit c524bce into lnbits:main Feb 26, 2025
@dni dni mentioned this pull request Feb 26, 2025
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.

4 participants