You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: