Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Dec 2, 2023
1 parent 3fd061d commit 0cb4256
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions svc/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@ function cassandraUsage(cb) {
);
}

function redisUsage(cb) {
redis.info((err) => {
if (err) {
return cb(err);
}
// console.log(info);
return cb(err, {
metric: Number(redis.server_info.used_memory),
async function redisUsage(cb) {
try {
const info = await redis.info();
const line = info.split('\n').find(line => line.startsWith('used_memory'));
return cb(null, {
metric: Number(line.split(':')[1]),
threshold: 4 * 10 ** 9,
});
});
} catch(e) {
cb(e);
}
}
const health = {
steamApi,
Expand Down
2 changes: 1 addition & 1 deletion svc/syncSubs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config = require('../config');
const stripeLib = require('stripe');

const stripe = stripeLib(config.STRIPE_SECRET);
s;

const { invokeInterval } = utility;

async function run(cb) {
Expand Down

0 comments on commit 0cb4256

Please sign in to comment.