Skip to content
Browse files

new redis client without debug stuff

  • Loading branch information...
1 parent 2e55c46 commit 83ba8ff0fa3be3b7574c1e2a6373f497ba064194 @mohlendo committed Nov 13, 2009
Showing with 9 additions and 2 deletions.
  1. +9 −1 redis.js
  2. +0 −1 server.js
View
10 redis.js
@@ -3,7 +3,11 @@ var sys = require("sys"),
var CRLF = "\r\n";
-function dbg(s) { sys.debug(s); }
+function dbg(s) {
+ if (GLOBAL.DEBUG) {
+ sys.debug(s);
+ }
+}
/**
* Constructs a new Redis client, calling "callback" if successfully connected.
@@ -172,6 +176,10 @@ Redis.prototype.type = function(key) {
// commands operating on the key space
+Redis.prototype.randomkey = function() {
+ return this._send("RANDOMKEY");
+};
+
Redis.prototype.dbsize = function() {
return this._send("DBSIZE");
};
View
1 server.js
@@ -26,7 +26,6 @@ function createChannel(name) {
this.appendMessage = function (nick, type, text) {
rclient.llen(name).addCallback(function (value) {
- sys.debug("next index " + value);
var m = { index: value
, nick: nick
, type: type // "msg", "join", "part"

0 comments on commit 83ba8ff

Please sign in to comment.
Something went wrong with that request. Please try again.