formatting and conftest
This commit is contained in:
parent
d2c216d6db
commit
36f54ff0c3
|
@ -12,7 +12,7 @@ import time
|
|||
import click
|
||||
import uvicorn
|
||||
|
||||
from lnbits.settings import settings, set_cli_settings
|
||||
from lnbits.settings import set_cli_settings, settings
|
||||
|
||||
|
||||
@click.command(
|
||||
|
|
|
@ -151,10 +151,12 @@ if not settings.lnbits_admin_ui:
|
|||
for key, value in settings.dict(exclude_none=True).items():
|
||||
logger.debug(f"{key}: {value}")
|
||||
|
||||
|
||||
def set_cli_settings(**kwargs):
|
||||
for key, value in kwargs.items():
|
||||
setattr(settings, key, value)
|
||||
|
||||
|
||||
async def check_admin_settings():
|
||||
if settings.lnbits_admin_ui:
|
||||
try:
|
||||
|
|
|
@ -28,7 +28,7 @@ def app(event_loop):
|
|||
# use redefined version of the event loop for scope="session"
|
||||
# loop = asyncio.get_event_loop()
|
||||
loop = event_loop
|
||||
#loop.run_until_complete(migrate_databases())
|
||||
loop.run_until_complete(migrate_databases())
|
||||
yield app
|
||||
# # get the current event loop and gracefully stop any running tasks
|
||||
# loop = event_loop
|
||||
|
|
|
@ -4,6 +4,7 @@ import sqlite3
|
|||
from typing import List
|
||||
|
||||
import psycopg2
|
||||
|
||||
from lnbits.settings import settings
|
||||
|
||||
# Python script to migrate an LNbits SQLite DB to Postgres
|
||||
|
|
Loading…
Reference in New Issue
Block a user