feat: add extension clean-up endpoint
This commit is contained in:
parent
230729483c
commit
7ec3045130
4 changed files with 29 additions and 6 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import asyncio
|
||||
from typing import List
|
||||
|
||||
from fastapi import APIRouter
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
|
@ -19,6 +20,7 @@ nostrrelay_static_files = [
|
|||
}
|
||||
]
|
||||
|
||||
scheduled_tasks: List[asyncio.Task] = []
|
||||
|
||||
def nostrrelay_renderer():
|
||||
return template_renderer(["lnbits/extensions/nostrrelay/templates"])
|
||||
|
|
@ -31,4 +33,5 @@ from .views_api import * # noqa
|
|||
|
||||
def nostrrelay_start():
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.create_task(catch_everything_and_restart(wait_for_paid_invoices))
|
||||
task = loop.create_task(catch_everything_and_restart(wait_for_paid_invoices))
|
||||
scheduled_tasks.append(task)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue