sleep a bit
This commit is contained in:
parent
e119f5c4c5
commit
f755a44108
1 changed files with 2 additions and 0 deletions
2
tasks.py
2
tasks.py
|
|
@ -14,6 +14,7 @@ from .crud import get_pay_link
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from . import nostrclient_present, nostr_privatekey
|
from . import nostrclient_present, nostr_privatekey
|
||||||
from typing import List
|
from typing import List
|
||||||
|
import time
|
||||||
|
|
||||||
if nostrclient_present:
|
if nostrclient_present:
|
||||||
try:
|
try:
|
||||||
|
|
@ -102,6 +103,7 @@ async def on_invoice_paid(payment: Payment):
|
||||||
def send_event(_):
|
def send_event(_):
|
||||||
logger.debug(f"Sending zap to {ws.url}")
|
logger.debug(f"Sending zap to {ws.url}")
|
||||||
ws.send(zap_receipt.to_message())
|
ws.send(zap_receipt.to_message())
|
||||||
|
time.sleep(2)
|
||||||
ws.close()
|
ws.close()
|
||||||
|
|
||||||
ws = WebSocketApp(relay, on_open=send_event)
|
ws = WebSocketApp(relay, on_open=send_event)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue