sleep a bit

This commit is contained in:
callebtc 2023-03-23 23:46:16 +01:00
commit f755a44108

View file

@ -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)