mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-14 01:37:48 -05:00
Update sys_stats.js
This commit is contained in:
@@ -62,13 +62,7 @@ function updateActiveSystems() {
|
|||||||
|
|
||||||
exports.initStats = function() {
|
exports.initStats = function() {
|
||||||
// get the System Stats collection
|
// get the System Stats collection
|
||||||
|
db.get().createCollection("system_stats")
|
||||||
db.get().collection("system_stats").exists(function(err, result) {
|
|
||||||
if (result) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
db.get().collection('system_stats', function(err, statsCollection) {
|
db.get().collection('system_stats', function(err, statsCollection) {
|
||||||
var cursor = statsCollection.find();
|
var cursor = statsCollection.find();
|
||||||
|
|
||||||
@@ -102,17 +96,6 @@ exports.initStats = function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
db.get().createCollection("system_stats", function(err, res) {
|
|
||||||
if (err) {
|
|
||||||
console.log("Error creating system_stats collection");
|
|
||||||
console.log(err);
|
|
||||||
} else {
|
|
||||||
console.log('system_stats created!');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// keeps track of the number of calls that get uploaded with an audio file
|
// keeps track of the number of calls that get uploaded with an audio file
|
||||||
|
|||||||
Reference in New Issue
Block a user