refactor nostrclient

This commit is contained in:
callebtc 2023-03-21 16:17:04 +01:00
parent 38f28ac6aa
commit d67133ae61
5 changed files with 43 additions and 105 deletions

View file

@ -1,3 +1,4 @@
import asyncio
from fastapi import APIRouter
from lnbits.db import Database
from lnbits.helpers import template_renderer
@ -22,13 +23,9 @@ def nostr_renderer():
from .tasks import init_relays, subscribe_events
from .views import * # noqa
from .views_api import * # noqa
def nostrclient_start():
loop = asyncio.get_event_loop()
loop.create_task(catch_everything_and_restart(init_relays))
# loop.create_task(catch_everything_and_restart(send_data))
# loop.create_task(catch_everything_and_restart(receive_data))
loop.create_task(catch_everything_and_restart(subscribe_events))