Skip to content

Commit cbe6881

Browse files
committed
Minor back-end code cleanup
1 parent 7615d17 commit cbe6881

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

chronos_npm_package/chronos.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ chronos.track = () => {
103103
return null;
104104
};
105105

106-
/**
106+
/**
107107
* **********************************************
108108
* COLLECT KAFKA METRICS
109109
* Only supports MongoDB and PostgreSQL for now!
@@ -112,7 +112,7 @@ chronos.track = () => {
112112

113113
chronos.kafka = function () {
114114
const { database, jmxuri } = userConfig;
115-
if (jmxuri === undefined){
115+
if (jmxuri === undefined) {
116116
console.log('No specified URI for a JMX Exporter');
117117
return;
118118
}

chronos_npm_package/controllers/healthHelpers.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ healthHelpers.collectHealthData = () => {
156156
})
157157
);
158158

159-
160-
161159
promises.push(
162160
si
163161
.processes()

chronos_npm_package/controllers/kafkaHelpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ kafkaHelpers.kafkaFetch = function (config) {
4242
return fetch(config.jmxuri)
4343
.then(data => data.text())
4444
.then(data => kafkaHelpers.extractWord(data))
45-
.catch(err => console.log(err));
45+
.catch(err => console.log('Error Fetching Data from JMX Exporter: ', err));
4646
};
4747

4848
module.exports = kafkaHelpers;

chronos_npm_package/controllers/postgres.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,6 @@ chronos.kafka = function (userConfig) {
320320
const numDataPoints = parsedArray.length;
321321
const queryString = createQueryString(numDataPoints, 'kafkametrics');
322322
const queryArray = createQueryArray(parsedArray);
323-
// console.log('POSTGRES QUERY STRING: ', queryString);
324-
// console.log('POSTGRES QUERY ARRAY', queryArray);
325323
return client.query(queryString, queryArray);
326324
})
327325
.then(() => console.log('Kafka metrics recorded in PostgreSQL'))

0 commit comments

Comments
 (0)