From f755a441080135e09641bde83fd5b8cfcf56b89f Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Thu, 23 Mar 2023 23:46:16 +0100 Subject: [PATCH] sleep a bit --- tasks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks.py b/tasks.py index 39af433..715823b 100644 --- a/tasks.py +++ b/tasks.py @@ -14,6 +14,7 @@ from .crud import get_pay_link from threading import Thread from . import nostrclient_present, nostr_privatekey from typing import List +import time if nostrclient_present: try: @@ -102,6 +103,7 @@ async def on_invoice_paid(payment: Payment): def send_event(_): logger.debug(f"Sending zap to {ws.url}") ws.send(zap_receipt.to_message()) + time.sleep(2) ws.close() ws = WebSocketApp(relay, on_open=send_event)