Compare View
Commits (2)
Changes
Showing 3 changed files Side-by-side Diff
gateway/pull.js
... | ... | @@ -192,7 +192,7 @@ function updateTaskOnMatrix(trx_id, rc) { |
192 | 192 | } |
193 | 193 | } |
194 | 194 | |
195 | -function forwardCoreTaskToPartner(coreMessage) { | |
195 | +function forwardCoreTaskToPartner(coreMessage, start_time) { | |
196 | 196 | let task; |
197 | 197 | |
198 | 198 | try { |
... | ... | @@ -200,8 +200,11 @@ function forwardCoreTaskToPartner(coreMessage) { |
200 | 200 | } |
201 | 201 | catch(e) { |
202 | 202 | logger.warn('Exception on parsing CORE pull task response', {coreMessage: coreMessage, error: e}); |
203 | + return; | |
203 | 204 | } |
204 | 205 | |
206 | + const core_pull_request_time = start_time ? (new Date() -- start_time) / 1000 : null; | |
207 | + | |
205 | 208 | incrementCounterTrx(); |
206 | 209 | |
207 | 210 | task.remote_product = getRemoteProduct(task.product); |
... | ... | @@ -210,7 +213,7 @@ function forwardCoreTaskToPartner(coreMessage) { |
210 | 213 | |
211 | 214 | const created_ts = new Date(task.created); |
212 | 215 | const queue_time = ((new Date()) - created_ts) / 1000; |
213 | - logger.info('Got task from CORE', {trx_id: task.trx_id, destination: task.destination, product: task.product, queue_time: queue_time}); | |
216 | + logger.info('Got task from CORE', {trx_id: task.trx_id, destination: task.destination, product: task.product, queue_time: queue_time, core_pull_request_time: core_pull_request_time}); | |
214 | 217 | |
215 | 218 | taskArchive.get(task, function(res) { |
216 | 219 | if (res && partner.advice) { |
package-lock.json