xmrToQueue.push(functionalData, function (err, transactionID) { if (err) { return console.error("Error processing payment for " + functionalData.address); } payee.transactionID = transactionID; payee.trackPayment(); });
createFlightRelatedData(function() { logger.info('number of customers = ' + customers.length); logger.info('number of airportCodeMappings = ' + airportCodeMappings.length); logger.info('number of flightSegments = ' + flightSegments.length); logger.info('number of flights = ' + flights.length); flightQueue.drain = function() { logger.info('all flights loaded'); logger.info('ending loading database'); res.send('Database Finished Loading'); }; customerQueue.push(customers); });
Object.keys(paymentData).forEach(function (key) { balanceQueue.push(paymentData[key], function () { }); totalPayments += paymentData[key].amount; });
paymentQueue.push(paymentDetails, function (body) { if (body.fee && body.fee > 10) { debug("Successful payment sent to: " + identifier); global.mysql.query("INSERT INTO transactions (bitcoin, address, payment_id, xmr_amt, transaction_hash, mixin, fees, payees) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", [0, address, paymentID, amount, body.tx_hash.match(hexChars)[0], global.config.payout.mixIn, body.fee, 1]).then(function (result) { payee.transactionID = result.insertId; payee.trackPayment(); }); } else { console.error("Unknown error from the wallet."); } });
paymentQueue.push(paymentDetails, function (body) { if (typeof body.tx_hash !== 'undefined') { debug("Successful payment sent to: " + identifier); global.mysql.query("INSERT INTO transactions (bitcoin, address, xmr_amt, transaction_hash, mixin, fees, payees) VALUES (?, ?, ?, ?, ?, ?, ?)", [0, address, amount, body.tx_hash.match(hexChars)[0], global.config.payout.mixIn, global.config.payout.fee, 1]).then(function (result) { payee.transactionID = result.insertId; payee.trackPayment(); }); } else { console.error("Unknown error from the wallet."); } });
q.push({name:'task-'+i, run: function(cb){ util.log('t'+ i +' is running, waiting tasks: '+ q.length()); _self.reqList[i] = httpsGet(_ipStr+i,cb); }}, function(err) {//执行完成 util.log('t'+ i +' executed'); });
paymentQueue.push(paymentDetails, function (body) { if (body.fee && body.fee > 10) { return intCallback(null, orderStatus, body); } else { return intCallback("Unknown error from the wallet."); } });
paymentQueue.push(paymentDetails, function (body) { if (body.fee && body.fee > 10) { debug("Successful payment sent to: " + identifier); global.mysql.query("INSERT INTO transactions (bitcoin, address, payment_id, xmr_amt, transaction_hash, mixin, fees, payees) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", [0, address, paymentID, amount, body.tx_hash.match(hexChars)[0], global.config.payout.mixIn, body.fee, 1]).then(function (result) { payee.transactionID = result.insertId; payee.trackPayment(); }); } else { console.error("Unknown error from the wallet."); } });
paymentQueue.push(paymentDetails, function (body) { if (body.fee && body.fee > 10) { debug("Successful payment sent to: " + identifier); global.mysql.query("INSERT INTO transactions (bitcoin, address, payment_id, xmr_amt, transaction_hash, mixin, fees, payees) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", [0, address, paymentID, amount, body.tx_hash.match(hexChars)[0], global.config.payout.mixIn, body.fee, 1]).then(function (result) { payee.transactionID = result.insertId; payee.trackPayment(); }); } else { console.error("Unknown error from the wallet."); } });
paymentQueue.push(paymentDetails, function (body) { if (body.fee && body.fee > 10) { debug("Successful payment sent to: " + identifier); global.mysql.query("INSERT INTO transactions (bitcoin, address, xmr_amt, transaction_hash, mixin, fees, payees) VALUES (?, ?, ?, ?, ?, ?, ?)", [0, address, amount, body.tx_hash.match(hexChars)[0], global.config.payout.mixIn, body.fee, 1]).then(function (result) { payee.transactionID = result.insertId; payee.trackPayment(); }); } else { console.error("Unknown error from the wallet."); } });
xmrToQueue.push(functionalData, function (err, transactionID) { if (err) { return console.error("Error processing payment for " + functionalData.address); } payee.transactionID = transactionID; payee.trackPayment(); });
shapeshiftQueue.push(functionalData, function (err, transactionID) { if (err) { return console.error("Error processing payment for " + functionalData.address); } payee.transactionID = transactionID; payee.trackPayment(); });
paymentQueue.push(paymentDetails, function (body) { if (typeof body.tx_hash !== 'undefined') { debug("Successful payment sent to: " + identifier); global.mysql.query("INSERT INTO transactions (bitcoin, address, payment_id, xmr_amt, transaction_hash, mixin, fees, payees) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", [0, address, paymentID, amount, body.tx_hash.match(hexChars)[0], global.config.payout.mixIn, global.config.payout.fee, 1]).then(function (result) { payee.transactionID = result.insertId; payee.trackPayment(); }); } else { console.error("Unknown error from the wallet."); } });
paymentQueue.push(paymentDetails, function (body) { if (body.fee && body.fee > 10) { debug("Successful payment sent to: " + identifier); global.mysql.query("INSERT INTO transactions (bitcoin, address, xmr_amt, transaction_hash, mixin, fees, payees) VALUES (?, ?, ?, ?, ?, ?, ?)", [0, address, amount, body.tx_hash.match(hexChars)[0], global.config.payout.mixIn, body.fee, 1]).then(function (result) { payee.transactionID = result.insertId; payee.trackPayment(); }); } else { console.error("Unknown error from the wallet."); } });
paymentQueue.push(paymentDetails, function (body) { if (body.fee && body.fee > 10) { debug("Successful payment sent to: " + identifier); global.mysql.query("INSERT INTO transactions (bitcoin, address, xmr_amt, transaction_hash, mixin, fees, payees) VALUES (?, ?, ?, ?, ?, ?, ?)", [0, address, amount, body.tx_hash.match(hexChars)[0], global.config.payout.mixIn, body.fee, 1]).then(function (result) { payee.transactionID = result.insertId; payee.trackPayment(); }); } else { console.error("Unknown error from the wallet."); } });