storage/redis_old.js
function initRedis() {
    return when.promise((resolve, reject) => {
      redis.get(name, (err, res) => {
        if(err) {
          memStore = {};
        } else if(res) {
          memStore = JSON.parse(res);
        } else {
          memStore = {};
        }
        resolve(true);
      });
    });
  }
function initRedis() {
    return when.promise((resolve, reject) => {
      redis.get(name, (err, res) => {
        if(err) {
          memStore = {};
        } else if(res) {
          memStore = JSON.parse(res);
        } else {
          memStore = {};
        }
        resolve(true);
      });
    });
  }
function initRedis ( ) { return when . promise ( ( resolve , reject ) => { redis . get ( name , ( err , res ) => { if ( err ) { memStore = { } ; } else if ( res ) { memStore = JSON . parse ( res ) ; } else { memStore = { } ; } resolve ( true ) ; } ) ; } ) ; }
load memStore state from redis
load memStore state from redis