forked from redis/node-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* authentication retry while server is loading db (danmaz74) [redisGH-101] * command arguments processing issue with arrays New features: * Auto update of new commands from redis.io (Dave Hoover) * Performance improvements and backpressure controls. * Commands now return the true/false value from the underlying socket write(s). * Implement command_queue high water and low water for more better control of queueing. See `examples/backpressure_drain.js` for more information.
- Loading branch information
Showing
3 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
var redis = require("../index"), | ||
client = redis.createClient(null, null, { | ||
command_queue_high_water: 5, | ||
command_queue_low_water: 1 | ||
}), | ||
remaining_ops = 10000, paused = false; | ||
|
||
function op() { | ||
if (remaining_ops <= 0) { | ||
console.error("Finished."); | ||
process.exit(0); | ||
} | ||
|
||
remaining_ops--; | ||
if (client.hset("test hash", "val " + remaining_ops, remaining_ops) === false) { | ||
console.log("Pausing at " + remaining_ops); | ||
paused = true; | ||
} else { | ||
process.nextTick(op); | ||
} | ||
} | ||
|
||
client.on("drain", function () { | ||
if (paused) { | ||
console.log("Resuming at " + remaining_ops); | ||
paused = false; | ||
process.nextTick(op); | ||
} else { | ||
console.log("Got drain while not paused at " + remaining_ops); | ||
} | ||
}); | ||
|
||
op(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ "name" : "redis", | ||
"version" : "0.6.1", | ||
"version" : "0.6.2", | ||
"description" : "Redis client library", | ||
"author": "Matt Ranney <[email protected]>", | ||
"contributors": [ | ||
|