Skip to content

Instantly share code, notes, and snippets.

@DveMac
Created June 6, 2011 20:23
Show Gist options
  • Save DveMac/1011015 to your computer and use it in GitHub Desktop.
Save DveMac/1011015 to your computer and use it in GitHub Desktop.
var result;
result = {};
client.keys('article:*', function(err, replies) {
replies.forEach(function(k) {
client.hgetall(k, function(err, obj) {
result[obj.ref] = obj;
});
});
});
//wait til done
cb(null, result);
@walkingeyerobot
Copy link

put cb(null, result); after line 7 to have it executed last.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment