fix: linting issues introduced last commit (#92)
This commit is contained in:
parent
7eea2330c9
commit
5a0d7ee4ed
1 changed files with 4 additions and 4 deletions
8
tasks.py
8
tasks.py
|
|
@ -1,6 +1,5 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
from typing import List
|
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
import websockets
|
import websockets
|
||||||
|
|
@ -157,11 +156,12 @@ async def send_zap(payment: Payment):
|
||||||
relays = relays[:50]
|
relays = relays[:50]
|
||||||
|
|
||||||
# Create a list of tasks to run concurrently
|
# Create a list of tasks to run concurrently
|
||||||
tasks = [send_to_relay(relay, zap_receipt.to_message()) for relay in relays]
|
|
||||||
|
|
||||||
# Run all tasks concurrently. This is a "fire-and-forget" approach.
|
# Run all tasks concurrently. This is a "fire-and-forget" approach.
|
||||||
# We don't need to wait for all of them to complete here.
|
# We don't need to wait for all of them to complete here.
|
||||||
for task in tasks:
|
_ = [
|
||||||
asyncio.create_task(task)
|
asyncio.create_task(send_to_relay(relay, zap_receipt.to_message()))
|
||||||
|
for relay in relays
|
||||||
|
]
|
||||||
|
|
||||||
return zap_receipt
|
return zap_receipt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue