You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-07-31 05:44:24 +03:00
feat(client): add command timeout option (#3008)
Co-authored-by: Florian Schunk <149071178+florian-schunk@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
79749f2461
commit
65a12d50e7
@ -37,6 +37,19 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Timeout
|
||||
|
||||
This option is similar to the Abort Signal one, but provides an easier way to set timeout for commands. Again, this applies to commands that haven't been written to the socket yet.
|
||||
|
||||
```javascript
|
||||
const client = createClient({
|
||||
commandOptions: {
|
||||
timeout: 1000
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## ASAP
|
||||
|
||||
Commands that are executed in the "asap" mode are added to the beginning of the "to sent" queue.
|
||||
|
Reference in New Issue
Block a user