Do not watch all locked invoices in follow-invoices

This commit is contained in:
Reckless_Satoshi 2023-05-20 07:52:30 -07:00
parent 66f1a68963
commit 547a7212a0
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -58,15 +58,15 @@ class Command(BaseCommand):
LND Background: SubscribeInvoices stub iterator would be great to use here.
However, it only sends updates when the invoice is OPEN (new) or SETTLED.
We are very interested on the other two states (CANCELLED and ACCEPTED).
Therefore, this thread (follow_invoices) will iterate over all LNpayment
objects and do InvoiceLookupV2 every X seconds to update their state 'live'
Therefore, this thread (follow_invoices) will iterate over all LNpayments in
INVGEN status and do InvoiceLookupV2 every X seconds to update their status.
"""
# time it for debugging
t0 = time.time()
queryset = LNPayment.objects.filter(
type=LNPayment.Types.HOLD,
status__in=[LNPayment.Status.INVGEN, LNPayment.Status.LOCKED],
status=LNPayment.Status.INVGEN,
)
debug = {}