Open slavafomin opened 2 months ago
I hope someone would find this helpful: what I've found out (the hard way) is that blocking connections (like XREAD BLOCK
) should be executed by it's own instance of ioredis
, because the library won't create a new connection for you, you must do this manually. Otherwise your blocking command could block the other parts of your application that relies on Redis.
Then, you can use the Redis.disconnect()
method to terminate such blocking commands (do not use quit()
).
Hello!
Thank you for this great library!
However, I can't find a way to abort the pending command execution. For example: I'm using
XREAD BLOCK 60000 …
(XREAD) command to listen for Redis stream. It blocks execution for e.g. 60 seconds. What if I need to stop this command and abort it in the middle? E.g. when I receive a signal from the OS to terminate the process or something.It should either return the "Cancelable Promise" or accept an AbortSignal. Am I missing something or is it not implemented yet?
Thanks!