Minor improvement
This commit is contained in:
parent
a8a98d0083
commit
94c619192b
@ -20,7 +20,6 @@ class WeatherManager {
|
||||
} as const
|
||||
|
||||
private readonly logger = Logger.type(LoggerType.APP)
|
||||
private io: Server | null = null
|
||||
private intervalId: NodeJS.Timeout | null = null
|
||||
|
||||
private weatherState: WeatherState = {
|
||||
@ -29,7 +28,6 @@ class WeatherManager {
|
||||
}
|
||||
|
||||
public async boot(): Promise<void> {
|
||||
this.io = SocketManager.getIO()
|
||||
await this.loadWeather()
|
||||
this.startWeatherLoop()
|
||||
this.logger.info('Weather manager loaded')
|
||||
@ -113,7 +111,8 @@ class WeatherManager {
|
||||
}
|
||||
|
||||
private emitWeather(): void {
|
||||
this.io?.emit('weather', this.weatherState)
|
||||
const io = SocketManager.getIO()
|
||||
io?.emit('weather', this.weatherState)
|
||||
}
|
||||
|
||||
private async saveWeather(): Promise<void> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user