Delete old pings also on startup
This commit is contained in:
12
lib/app.js
12
lib/app.js
@ -22,11 +22,13 @@ class App {
|
||||
// Setup database instance
|
||||
this.database.ensureIndexes(() => {
|
||||
this.database.loadGraphPoints(config.graphDuration, () => {
|
||||
if (config.deleteOldPings) {
|
||||
this.database.initOldPingsDeleter()
|
||||
}
|
||||
|
||||
this.database.loadRecords(callback)
|
||||
this.database.loadRecords(() => {
|
||||
if (config.deleteOldPings) {
|
||||
this.database.initOldPingsDelete(callback)
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user