Payment processing is 98% done...
This commit is contained in:
parent
be1b1f689c
commit
eba32adde9
|
@ -357,18 +357,30 @@ function SetupForPool(logger, poolOptions){
|
||||||
console.log(JSON.stringify(sendManyCmd, null, 4));
|
console.log(JSON.stringify(sendManyCmd, null, 4));
|
||||||
|
|
||||||
return; //not yet...
|
return; //not yet...
|
||||||
daemon.cmd(sendManyCmd, function(error, result){
|
daemon.cmd('sendmany', sendManyCmd, function(results){
|
||||||
//if successful then do finalRedisCommands
|
if (results[0].error){
|
||||||
|
callback('done - error with sendmany ' + JSON.stringify(results[0].error));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
redisClient.multi(finalRedisCommands).exec(function(error, results){
|
||||||
|
if (error){
|
||||||
|
callback('done - error with final redis commands for cleaning up ' + JSON.stringify(error));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback(null, 'Payments sent');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
], function(error, result){
|
], function(error, result){
|
||||||
console.log(error);
|
if (error)
|
||||||
//log error completion
|
logger.debug(error)
|
||||||
|
|
||||||
|
else{
|
||||||
|
logger.debug(result);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue