const each = require('async/each')
const eachLimit = require('async/eachLimit')
const waterfall = require('async/waterfall')
const each = require('async/each')
const eachLimit = require('async/eachLimit')
const waterfall = require('async/waterfall')
removeAll.call(this, function (err) {
if (err) logger.error('Cannot flush the requests.', { error: err })
removeAll.call(this, function (err) {
if (err) logger.error('Cannot flush the requests.', { error: err })
makeRequest(toPod, requestToMake.endpoint, requestToMake.datas, function (success) {
if (success === true) {
makeRequest(toPod, requestToMake.endpoint, requestToMake.datas, function (success) {
if (success === true) {
- logger.debug('Removing requests for %s pod.', requestToMake.toPodId, { requestsIds: requestToMake.ids })
+ logger.debug('Removing requests for pod %s.', requestToMake.toPodId, { requestsIds: requestToMake.ids })
if (goodPods.length !== 0) {
Pod.incrementScores(goodPods, constants.PODS_SCORE.BONUS, function (err) {
if (goodPods.length !== 0) {
Pod.incrementScores(goodPods, constants.PODS_SCORE.BONUS, function (err) {
})
}
if (badPods.length !== 0) {
Pod.incrementScores(badPods, constants.PODS_SCORE.MALUS, function (err) {
})
}
if (badPods.length !== 0) {
Pod.incrementScores(badPods, constants.PODS_SCORE.MALUS, function (err) {