feat: restart disconnected relays

This commit is contained in:
Vlad Stan 2023-06-26 10:21:06 +03:00
parent c81a804dea
commit ce8b95c2c7
4 changed files with 63 additions and 34 deletions

View file

@ -36,7 +36,7 @@ def nostr_renderer():
return template_renderer(["lnbits/extensions/nostrclient/templates"])
from .tasks import init_relays, subscribe_events
from .tasks import check_relays, init_relays, subscribe_events
from .views import * # noqa
from .views_api import * # noqa
@ -47,3 +47,5 @@ def nostrclient_start():
scheduled_tasks.append(task1)
task2 = loop.create_task(catch_everything_and_restart(subscribe_events))
scheduled_tasks.append(task2)
task3 = loop.create_task(catch_everything_and_restart(check_relays))
scheduled_tasks.append(task3)