Commit 60ccd8c27c3a6ba8a72300a36209b751f185fcab
1 parent
475852689b
Exists in
master
include outgoing on spool count
Showing 1 changed file with 7 additions and 1 deletions Side-by-side Diff
lib/apiserver/routers/smstools.js
... | ... | @@ -46,14 +46,20 @@ function pageLog(req, res) { |
46 | 46 | |
47 | 47 | async function pageSpoolCount(req, res) { |
48 | 48 | const checkedCount = await smstoolsUtil.fileCountOnDir('/var/spool/sms/checked'); |
49 | + const outgoingCount = await smstoolsUtil.fileCountOnDir('/var/spool/sms/outgoing'); | |
49 | 50 | const indosatCount = await smstoolsUtil.fileCountOnDir('/var/spool/sms/queue/indosat'); |
50 | 51 | const otherCount = await smstoolsUtil.fileCountOnDir('/var/spool/sms/queue/other'); |
51 | 52 | |
52 | 53 | res.json({ |
53 | 54 | checkedCount, |
55 | + outgoingCount, | |
54 | 56 | indosatCount, |
55 | 57 | otherCount, |
56 | - totalQueueCount: Number(checkedCount) + Number(indosatCount) + Number(otherCount), | |
58 | + totalQueueCount: | |
59 | + Number(checkedCount) | |
60 | + + Number(outgoingCount) | |
61 | + + Number(indosatCount) | |
62 | + + Number(otherCount), | |
57 | 63 | }); |
58 | 64 | } |
59 | 65 |