asyncpg
asyncpg copied to clipboard
cannot recieve notify from another connection.
Notify can only recieve when sendNotify is send through the same connection with the notify.
proc testConnectionNotify(conn, conn2: apgConnection): Future[bool] {.async.} =
var r1 = false
var r2 = false
await conn.listenNotify("testChannel")
var notifyFuture1 = conn.notify("testChannel")
await conn2.sendNotify("testChannel", "payload")
#await conn.sendNotify("testChannel", "payload")
var sleepFuture1 = sleepAsync(100)
await notifyFuture1 or sleepFuture1
if notifyFuture1.finished:
echo notifyFuture1.read.payload
r1 = true
return true
else:
echo "failed"
return false
I'm encountering the same issue for now, is there any solution?