mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-13 19:37:42 +01:00
remove STARTUP_INVOICE_EXPIRY_CHECK
This commit is contained in:
parent
4e69924c9c
commit
1a98f15d48
4 changed files with 5 additions and 7 deletions
|
@ -38,8 +38,6 @@ LNBITS_SERVICE_FEE="0.0"
|
||||||
LNBITS_RESERVE_FEE_MIN=2000
|
LNBITS_RESERVE_FEE_MIN=2000
|
||||||
# value in percent
|
# value in percent
|
||||||
LNBITS_RESERVE_FEE_PERCENT=1.0
|
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
|
# Change theme
|
||||||
LNBITS_SITE_TITLE="LNbits"
|
LNBITS_SITE_TITLE="LNbits"
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from sqlalchemy.exc import OperationalError # type: ignore
|
|
||||||
from lnbits import bolt11
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from sqlalchemy.exc import OperationalError # type: ignore
|
||||||
|
|
||||||
|
from lnbits import bolt11
|
||||||
|
|
||||||
|
|
||||||
async def m000_create_migrations_table(db):
|
async def m000_create_migrations_table(db):
|
||||||
await db.execute(
|
await db.execute(
|
||||||
|
|
|
@ -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_MIN = env.int("LNBITS_RESERVE_FEE_MIN", default=2000)
|
||||||
RESERVE_FEE_PERCENT = env.float("LNBITS_RESERVE_FEE_PERCENT", default=1.0)
|
RESERVE_FEE_PERCENT = env.float("LNBITS_RESERVE_FEE_PERCENT", default=1.0)
|
||||||
SERVICE_FEE = env.float("LNBITS_SERVICE_FEE", default=0.0)
|
SERVICE_FEE = env.float("LNBITS_SERVICE_FEE", default=0.0)
|
||||||
STARTUP_INVOICE_EXPIRY_CHECK = env.bool("STARTUP_INVOICE_EXPIRY_CHECK", default=True)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
LNBITS_COMMIT = (
|
LNBITS_COMMIT = (
|
||||||
|
|
|
@ -15,7 +15,6 @@ from lnbits.core.crud import (
|
||||||
get_standalone_payment,
|
get_standalone_payment,
|
||||||
)
|
)
|
||||||
from lnbits.core.services import redeem_lnurl_withdraw
|
from lnbits.core.services import redeem_lnurl_withdraw
|
||||||
from lnbits.settings import WALLET, STARTUP_INVOICE_EXPIRY_CHECK
|
|
||||||
|
|
||||||
from .core import db
|
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)"
|
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
|
# 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")
|
logger.debug("Task: deleting all expired invoices")
|
||||||
start_time: float = time.time()
|
start_time: float = time.time()
|
||||||
await delete_expired_invoices(conn=conn)
|
await delete_expired_invoices(conn=conn)
|
||||||
|
|
Loading…
Add table
Reference in a new issue