feat: add settings.lnbits_running (#2450)

* feat: add `settings.lnbits_runing `
This commit is contained in:
Vlad Stan
2024-04-22 12:33:53 +03:00
committed by GitHub
parent e91096c535
commit 4ac30116a9
21 changed files with 41 additions and 26 deletions
+3 -1
View File
@@ -6,6 +6,8 @@ from typing import Any, NamedTuple, Optional
from loguru import logger
from lnbits.settings import settings
class Cached(NamedTuple):
value: Any
@@ -52,7 +54,7 @@ class Cache:
return value
async def invalidate_forever(self):
while True:
while settings.lnbits_running:
try:
await asyncio.sleep(self.interval)
ts = time()