Commit 281fa7640c787add4bb8f95926c23cff9b9284ac
1 parent
b840903051
Exists in
master
optimizing retry
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
partner-cjk.js
... | ... | @@ -141,6 +141,8 @@ function topupResponseHandler(body) { |
141 | 141 | |
142 | 142 | if ((task.retry == maxRetry) || (rc != '68')) { |
143 | 143 | callbackReport(trxid, rc, message); |
144 | + } else { | |
145 | + logger.info('Not reporting to AAA for duplicate 68', {task: task}); | |
144 | 146 | } |
145 | 147 | |
146 | 148 | if (rc == '68') { |
... | ... | @@ -149,7 +151,7 @@ function topupResponseHandler(body) { |
149 | 151 | |
150 | 152 | if (task.retry) { |
151 | 153 | logger.info('Got pending status, retrying in ' + sleepBeforeRetry + 's'); |
152 | - setTimeout(topupRequest, sleepBeforeRetry * 1000, task); | |
154 | + setTimeout(topupRequest, sleepBeforeRetry * 1000, task, task.retry); | |
153 | 155 | } |
154 | 156 | else { |
155 | 157 | logger.warn('Maximum retry for pending status exceeded', {task: task}); |