remove STARTUP_INVOICE_EXPIRY_CHECK

This commit is contained in:
callebtc 2022-12-02 17:39:56 +01:00
parent 4e69924c9c
commit 1a98f15d48
4 changed files with 5 additions and 7 deletions

View file

@ -38,8 +38,6 @@ LNBITS_SERVICE_FEE="0.0"
LNBITS_RESERVE_FEE_MIN=2000
# value in percent
LNBITS_RESERVE_FEE_PERCENT=1.0
# check invoice expiry on every startup (can be slow on large instances)
STARTUP_INVOICE_EXPIRY_CHECK=True
# Change theme
LNBITS_SITE_TITLE="LNbits"

View file

@ -1,7 +1,9 @@
from sqlalchemy.exc import OperationalError # type: ignore
from lnbits import bolt11
import datetime
from sqlalchemy.exc import OperationalError # type: ignore
from lnbits import bolt11
async def m000_create_migrations_table(db):
await db.execute(

View file

@ -69,7 +69,6 @@ PREFER_SECURE_URLS = env.bool("LNBITS_FORCE_HTTPS", default=True)
RESERVE_FEE_MIN = env.int("LNBITS_RESERVE_FEE_MIN", default=2000)
RESERVE_FEE_PERCENT = env.float("LNBITS_RESERVE_FEE_PERCENT", default=1.0)
SERVICE_FEE = env.float("LNBITS_SERVICE_FEE", default=0.0)
STARTUP_INVOICE_EXPIRY_CHECK = env.bool("STARTUP_INVOICE_EXPIRY_CHECK", default=True)
try:
LNBITS_COMMIT = (

View file

@ -15,7 +15,6 @@ from lnbits.core.crud import (
get_standalone_payment,
)
from lnbits.core.services import redeem_lnurl_withdraw
from lnbits.settings import WALLET, STARTUP_INVOICE_EXPIRY_CHECK
from .core import db
@ -144,7 +143,7 @@ async def check_pending_payments():
f"Task: pending check finished for {len(pending_payments)} payments (took {time.time() - start_time:0.3f} s)"
)
# we delete expired invoices once upon the first pending check
if incoming and STARTUP_INVOICE_EXPIRY_CHECK:
if incoming:
logger.debug("Task: deleting all expired invoices")
start_time: float = time.time()
await delete_expired_invoices(conn=conn)