rm refund task

This commit is contained in:
Shroominic
2025-08-05 20:16:47 -03:00
parent 95e320f823
commit ca748edaf5
2 changed files with 3 additions and 11 deletions
+3 -7
View File
@@ -10,7 +10,7 @@ from ..balance import balance_router, deprecated_wallet_router
from ..discovery import providers_router
from ..payment.models import MODELS, models_router, update_sats_pricing
from ..proxy import proxy_router
from ..wallet import check_for_refunds, periodic_payout
from ..wallet import periodic_payout
from .admin import admin_router
from .db import init_db
from .logging import get_logger, setup_logging
@@ -19,7 +19,7 @@ from .logging import get_logger, setup_logging
setup_logging()
logger = get_logger(__name__)
__version__ = "0.0.1"
__version__ = "0.1.0"
@asynccontextmanager
@@ -30,7 +30,6 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]:
await init_db()
pricing_task = asyncio.create_task(update_sats_pricing())
refund_task = asyncio.create_task(check_for_refunds())
payout_task = asyncio.create_task(periodic_payout())
yield
@@ -44,14 +43,11 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]:
finally:
logger.info("Application shutdown initiated")
refund_task.cancel()
pricing_task.cancel()
payout_task.cancel()
try:
await asyncio.gather(
pricing_task, refund_task, payout_task, return_exceptions=True
)
await asyncio.gather(pricing_task, payout_task, return_exceptions=True)
logger.info("Background tasks stopped successfully")
except Exception as e:
logger.error(
-4
View File
@@ -122,10 +122,6 @@ async def send_to_lnurl(amount: int, unit: CurrencyUnit, lnurl: str) -> dict[str
raise NotImplementedError
async def check_for_refunds() -> None:
logger.warning("check_for_refunds, temporary not implemented")
async def periodic_payout() -> None:
logger.warning("periodic_payout, temporary not implemented")