From 60ccd8c27c3a6ba8a72300a36209b751f185fcab Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <me@adhisimon.org> Date: Wed, 4 Dec 2019 15:20:51 +0700 Subject: [PATCH] include outgoing on spool count --- lib/apiserver/routers/smstools.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/apiserver/routers/smstools.js b/lib/apiserver/routers/smstools.js index 36e3793..dbacd0a 100644 --- a/lib/apiserver/routers/smstools.js +++ b/lib/apiserver/routers/smstools.js @@ -46,14 +46,20 @@ function pageLog(req, res) { async function pageSpoolCount(req, res) { const checkedCount = await smstoolsUtil.fileCountOnDir('/var/spool/sms/checked'); + const outgoingCount = await smstoolsUtil.fileCountOnDir('/var/spool/sms/outgoing'); const indosatCount = await smstoolsUtil.fileCountOnDir('/var/spool/sms/queue/indosat'); const otherCount = await smstoolsUtil.fileCountOnDir('/var/spool/sms/queue/other'); res.json({ checkedCount, + outgoingCount, indosatCount, otherCount, - totalQueueCount: Number(checkedCount) + Number(indosatCount) + Number(otherCount), + totalQueueCount: + Number(checkedCount) + + Number(outgoingCount) + + Number(indosatCount) + + Number(otherCount), }); } -- 1.9.0