general cleanup and unused imports removal

This commit is contained in:
Tiago vasconcelos
2021-11-25 18:52:16 +00:00
parent 2b0bd43974
commit cfac70d394
62 changed files with 159 additions and 442 deletions
-6
View File
@@ -19,12 +19,6 @@ async def wait_for_paid_invoices():
await on_invoice_paid(payment)
# async def register_listeners():
# invoice_paid_chan_send, invoice_paid_chan_recv = trio.open_memory_channel(2)
# register_invoice_listener(invoice_paid_chan_send)
# await wait_for_paid_invoices(invoice_paid_chan_recv)
async def on_invoice_paid(payment: Payment) -> None:
if "livestream" != payment.extra.get("tag"):
# not a livestream invoice
-1
View File
@@ -24,7 +24,6 @@ async def index(request: Request, user: User = Depends(check_user_exists)):
@livestream_ext.get("/track/{track_id}", name="livestream.track_redirect_download")
async def track_redirect_download(track_id, p: str = Query(...)):
print("BOO", track_id, p)
payment_hash = p
track = await get_track(track_id)
ls = await get_livestream_by_track(track_id)
+1 -1
View File
@@ -29,7 +29,7 @@ async def api_livestream_from_wallet(
ls = await get_or_create_livestream_by_wallet(g.wallet.id)
tracks = await get_tracks(ls.id)
producers = await get_producers(ls.id)
print("INIT", ls, tracks, producers)
try:
return {
**ls.dict(),