fix auto create worker with right password

This commit is contained in:
k7 2014-04-21 23:58:50 +08:00
parent 882f779e20
commit 75c091457b

View File

@ -63,8 +63,8 @@ module.exports = function(logger, poolConfig){
authCallback(false); authCallback(false);
}else{ }else{
connection.query( connection.query(
"INSERT INTO `pool_worker` (`id`, `account_id`, `username`, `password`, `difficulty`, `monitor`) VALUES (NULL, ?, ?, '123', '0', '0');", "INSERT INTO `pool_worker` (`id`, `account_id`, `username`, `password`, `difficulty`, `monitor`) VALUES (NULL, ?, ?, ?, '0', '0');",
[result[0].id,workerName.toLowerCase()], [result[0].id,workerName.toLowerCase(),password],
function(err, result){ function(err, result){
if (err){ if (err){
logger.error(logIdentify, logComponent, 'Database error when insert worker: ' + logger.error(logIdentify, logComponent, 'Database error when insert worker: ' +