first start recorder, then listen on websockets
This commit is contained in:
@@ -23,14 +23,14 @@ export default class MhdMapApp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
|
await this.recorder.start();
|
||||||
|
|
||||||
this.websockets.on('join', ws => {
|
this.websockets.on('join', ws => {
|
||||||
this.sendAction(ws, 'updateStops', this.stops);
|
this.sendAction(ws, 'updateStops', this.stops);
|
||||||
this.sendAction(ws, 'updateVehicles', this.vehicles);
|
this.sendAction(ws, 'updateVehicles', this.vehicles);
|
||||||
});
|
});
|
||||||
this.websockets.on('message', this._onWsMessage.bind(this));
|
this.websockets.on('message', this._onWsMessage.bind(this));
|
||||||
|
|
||||||
await this.recorder.start();
|
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.updateStatic();
|
this.updateStatic();
|
||||||
}, 1000 * 60 * 60 * 24);
|
}, 1000 * 60 * 60 * 24);
|
||||||
|
|||||||
Reference in New Issue
Block a user