You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Cursor should be a string
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
var redis = require("redis"),
|
var redis = require("redis"),
|
||||||
client = redis.createClient();
|
client = redis.createClient();
|
||||||
|
|
||||||
var cursor = 0;
|
var cursor = '0';
|
||||||
|
|
||||||
function scan() {
|
function scan() {
|
||||||
client.scan(
|
client.scan(
|
||||||
@@ -17,7 +17,7 @@ function scan() {
|
|||||||
// From <http://redis.io/commands/scan>:
|
// From <http://redis.io/commands/scan>:
|
||||||
// An iteration starts when the cursor is set to 0,
|
// An iteration starts when the cursor is set to 0,
|
||||||
// and terminates when the cursor returned by the server is 0.
|
// and terminates when the cursor returned by the server is 0.
|
||||||
if (cursor === 0) {
|
if (cursor === '0') {
|
||||||
return console.log('Iteration complete');
|
return console.log('Iteration complete');
|
||||||
} else {
|
} else {
|
||||||
// Remember, more keys than COUNT or no keys may be returned
|
// Remember, more keys than COUNT or no keys may be returned
|
||||||
|
Reference in New Issue
Block a user