mirror of
https://github.com/pawelmalak/flame.git
synced 2026-02-28 01:13:11 +08:00
Docker build. Catch client routes on server. Initial config utility
This commit is contained in:
@@ -2,6 +2,7 @@ const schedule = require('node-schedule');
|
||||
const getExternalWeather = require('./getExternalWeather');
|
||||
const Sockets = require('../Sockets');
|
||||
|
||||
// Update weather data every 15 minutes
|
||||
const weatherJob = schedule.scheduleJob('updateWeather', '0 */15 * * * *', async () => {
|
||||
try {
|
||||
const weatherData = await getExternalWeather();
|
||||
@@ -10,4 +11,9 @@ const weatherJob = schedule.scheduleJob('updateWeather', '0 */15 * * * *', async
|
||||
} catch (err) {
|
||||
console.log(err.message);
|
||||
}
|
||||
})
|
||||
|
||||
// Clear old weather data every 4 hours
|
||||
const weatherCleanerJob = schedule.scheduleJob('clearWeather', '0 0 */4 * * *', async () => {
|
||||
console.log('clean')
|
||||
})
|
||||
Reference in New Issue
Block a user