mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-25 05:49:36 +02:00
Update bookmark. Changes to CSS. Changes to WeatherJob
This commit is contained in:
parent
519b6d0746
commit
96aa1f7d69
11 changed files with 165 additions and 36 deletions
|
@ -4,10 +4,10 @@ const Sockets = require('../Sockets');
|
|||
|
||||
const weatherJob = schedule.scheduleJob('updateWeather', '0 */15 * * * *', async () => {
|
||||
try {
|
||||
await getExternalWeather();
|
||||
const weatherData = await getExternalWeather();
|
||||
console.log('weather updated');
|
||||
Sockets.getSocket('weather').socket.send('weather updated');
|
||||
Sockets.getSocket('weather').socket.send(JSON.stringify(weatherData));
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.log(err.message);
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue