vars refactor: that to this, ...

This commit is contained in:
Simon Martín 2018-08-01 11:30:17 +02:00
parent 5c0b7487f7
commit 79f2a8dde9

View File

@ -69,16 +69,11 @@ TemplateMaps.prototype._userTemplateLimit = function() {
* @param callback - function to pass results too.
*/
TemplateMaps.prototype._redisCmd = function(redisFunc, redisArgs, callback) {
var redisClient;
var that = this;
var db = that.db_signatures;
that.redis_pool.acquire(db, (err, data) => {
this.redis_pool.acquire(this.db_signatures, (err, redisClient) => {
assert.ifError(err);
redisClient = data;
redisArgs.push((err, data) => {
if ( ! _.isUndefined(redisClient) ) {
that.redis_pool.release(db, redisClient);
this.redis_pool.release(this.db_signatures, redisClient);
}
callback(err, data);
});