From 6b82a4fc4a673d7bd13dc0b0c5d84a11d716b9ef Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <gua@adhisimon.org> Date: Thu, 15 Oct 2015 16:28:24 +0700 Subject: [PATCH] incr decr trx count --- gentong.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gentong.js b/gentong.js index 5d4c70e..6681f4f 100644 --- a/gentong.js +++ b/gentong.js @@ -57,7 +57,13 @@ function topupRequest(task) { logger.info('Creating http request to gateway', {options: options}); + if (aaa) { + aaa.incrementTrxCount(); + aaa.incrementActiveTrxCount(); + } + request(options, function (error, response, body) { + aaa.decrementActiveTrxCount(); if (error) { -- 1.9.0