Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jun 14, 2010
  1. @fictorial

    Bump version.

    fictorial authored
Commits on May 25, 2010
  1. @fictorial

    Handle exception thrown from callback.

    fictorial authored
    Thanks to Alberto Piai for the tip.
Commits on May 4, 2010
  1. @fictorial
Commits on May 3, 2010
  1. @fictorial

    bump version to 0.3.2

    fictorial authored
Commits on May 1, 2010
  1. @fictorial

    bump version to 0.3.1

    fictorial authored
Commits on Apr 21, 2010
  1. @fictorial

    Reconnection handling. Client will now always callback when it cannot…

    fictorial authored
    … connect or reconnect.
    
    Node.js fails to emit 'error' when Redis is killed.  Thus, we use `.expectClose` on the client as a workaround.
    
    A test script:
    
        var sys = require('sys');
        var redis = require("../lib/redis-client");
        redis.debugMode = true;
        var client = redis.createClient(redis.DEFAULT_PORT, redis.DEFAULT_HOST, { maxReconnectionAttempts: 2 });
        client.set('test:foo', 'bar', function (err, data){
          if (err) sys.log("set test:foo: " + err);
          else     sys.log("set test:foo: " + data);
        });
        setTimeout(function() {
          sys.log("timeout fired");
          client.get('test:foo', function (err, data) {
              if (err) sys.log("get test:foo: " + err);
              else     sys.log("get test:foo: " + data);
    
              sys.log("closing client");
              client.close();
          })}, 5000);
    
    When Redis is down the entire time:
    
        DEBUG: [ENQUEUE] Not connected. Request queued. There are 1 requests queued.
        DEBUG: [NO CONNECTION]
        21 Apr 17:40:22 - set test:foo: Error: failed to establish a connection to Redis
        21 Apr 17:40:27 - timeout fired
        21 Apr 17:40:27 - get test:foo: Error: failed to establish a connection to Redis
        21 Apr 17:40:27 - closing client
    
    When Redis is up the entire time:
    
        ~/projects/redis-node-client(master)  node test/phillip.js
        DEBUG: [ENQUEUE] Not connected. Request queued. There are 1 requests queued.
        DEBUG: [CONNECT]
        DEBUG: [FLUSH QUEUE] 1 queued request buffers.
        DEBUG: [DEQUEUE/SEND] *3<CRLF>$3<CRLF>set<CRLF>$8<CRLF>test:foo<CRLF>$3<CRLF>bar<CRLF>. queued buffers remaining = 0
        DEBUG: [RECV] +OK<CRLF>
        21 Apr 17:42:40 - set test:foo: true
        21 Apr 17:42:43 - timeout fired
        DEBUG: [SEND] *2<CRLF>$3<CRLF>get<CRLF>$8<CRLF>test:foo<CRLF> originalCommands = 1
        DEBUG: [RECV] $3<CRLF>bar<CRLF>
        21 Apr 17:42:43 - get test:foo: bar
        21 Apr 17:42:43 - closing client
        DEBUG: [NO CONNECTION]
    
    When Redis is up initially, then killed.
    
        ~/projects/redis-node-client(master)  node test/phillip.js
        DEBUG: [ENQUEUE] Not connected. Request queued. There are 1 requests queued.
        DEBUG: [CONNECT]
        DEBUG: [FLUSH QUEUE] 1 queued request buffers.
        DEBUG: [DEQUEUE/SEND] *3<CRLF>$3<CRLF>set<CRLF>$8<CRLF>test:foo<CRLF>$3<CRLF>bar<CRLF>. queued buffers remaining = 0
        ^[[CDEBUG: [RECV] +OK<CRLF>
        21 Apr 17:37:10 - set test:foo: true
        DEBUG: [NO CONNECTION]
        DEBUG: [RECONNECTING 1/2]
        DEBUG: [WAIT 1000 ms]
        DEBUG: [NO CONNECTION]
        DEBUG: [RECONNECTING 2/2]
        DEBUG: [WAIT 2000 ms]
        DEBUG: [NO CONNECTION]
        21 Apr 17:37:14 - timeout fired
        21 Apr 17:37:14 - get test:foo: Error: failed to establish a connection to Redis
        21 Apr 17:37:14 - closing client
    
    When Redis is up initially, then killed, then brought back up immediately.
    
        ~/projects/redis-node-client(master)  node test/phillip.js
        DEBUG: [ENQUEUE] Not connected. Request queued. There are 1 requests queued.
        DEBUG: [CONNECT]
        DEBUG: [FLUSH QUEUE] 1 queued request buffers.
        DEBUG: [DEQUEUE/SEND] *3<CRLF>$3<CRLF>set<CRLF>$8<CRLF>test:foo<CRLF>$3<CRLF>bar<CRLF>. queued buffers remaining = 0
        DEBUG: [RECV] +OK<CRLF>
        21 Apr 17:43:17 - set test:foo: true
        DEBUG: [NO CONNECTION]
        DEBUG: [RECONNECTING 1/2]
        DEBUG: [WAIT 1000 ms]
        DEBUG: [CONNECT]
        21 Apr 17:43:22 - timeout fired
        DEBUG: [SEND] *2<CRLF>$3<CRLF>get<CRLF>$8<CRLF>test:foo<CRLF> originalCommands = 1
        DEBUG: [RECV] $3<CRLF>bar<CRLF>
        21 Apr 17:43:22 - get test:foo: bar
        21 Apr 17:43:22 - closing client
        DEBUG: [NO CONNECTION]
Commits on Apr 19, 2010
  1. @fictorial

    bump version

    fictorial authored
Commits on Apr 15, 2010
  1. @fictorial

    bump version

    fictorial authored
Commits on Apr 12, 2010
  1. @fictorial

    bump version

    fictorial authored
Commits on Apr 9, 2010
  1. @fictorial
Commits on Apr 6, 2010
  1. @fictorial

    Fixes for Kiwi

    fictorial authored
  2. @fictorial

    bump version

    fictorial authored
  3. @fictorial

    Kiwi support

    fictorial authored
Something went wrong with that request. Please try again.