replace ServerRegistration#unfurlSrv to DNSResolver class

This commit is contained in:
Nick Krecklow
2020-05-14 20:30:40 -05:00
parent a308eb35fb
commit 9a38160019
8 changed files with 82 additions and 75 deletions

View File

@ -1,5 +1,7 @@
const sqlite = require('sqlite3')
const TimeTracker = require('./time')
class Database {
constructor (app) {
this._app = app
@ -16,7 +18,7 @@ class Database {
loadGraphPoints (graphDuration, callback) {
// Query recent pings
const endTime = new Date().getTime()
const endTime = TimeTracker.getEpochMillis()
const startTime = endTime - graphDuration
this.getRecentPings(startTime, endTime, pingData => {