add DEBUG logs
This commit is contained in:
parent
0fc26d096f
commit
39f0153f9b
3 changed files with 43 additions and 10 deletions
6
tasks.py
6
tasks.py
|
|
@ -35,13 +35,17 @@ async def on_invoice_paid(payment: Payment) -> None:
|
|||
|
||||
|
||||
async def wait_for_nostr_events(nostr_client: NostrClient):
|
||||
logger.info("[NOSTRMARKET DEBUG] Starting wait_for_nostr_events task")
|
||||
while True:
|
||||
try:
|
||||
logger.info("[NOSTRMARKET DEBUG] Subscribing to all merchants...")
|
||||
await subscribe_to_all_merchants()
|
||||
|
||||
while True:
|
||||
logger.debug("[NOSTRMARKET DEBUG] Waiting for nostr event...")
|
||||
message = await nostr_client.get_event()
|
||||
logger.info(f"[NOSTRMARKET DEBUG] Received event from nostr_client: {message[:100]}...")
|
||||
await process_nostr_message(message)
|
||||
except Exception as e:
|
||||
logger.warning(f"Subcription failed. Will retry in one minute: {e}")
|
||||
logger.warning(f"[NOSTRMARKET DEBUG] Subscription failed. Will retry in 10 seconds: {e}")
|
||||
await asyncio.sleep(10)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue