From 51a0da8f10852afc33057787bbc1f38683324249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Malak?= Date: Mon, 15 Nov 2021 00:58:47 +0100 Subject: [PATCH] Removed additional weather logging --- .../components/Settings/AppDetails/AuthForm/AuthForm.tsx | 2 -- utils/clearWeatherData.js | 9 --------- utils/jobs.js | 2 +- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/client/src/components/Settings/AppDetails/AuthForm/AuthForm.tsx b/client/src/components/Settings/AppDetails/AuthForm/AuthForm.tsx index 4c56838..2742d76 100644 --- a/client/src/components/Settings/AppDetails/AuthForm/AuthForm.tsx +++ b/client/src/components/Settings/AppDetails/AuthForm/AuthForm.tsx @@ -79,8 +79,6 @@ export const AuthForm = (): JSX.Element => { setFormData({ ...formData, duration: e.target.value }) } > - - diff --git a/utils/clearWeatherData.js b/utils/clearWeatherData.js index 5e4972a..df8873c 100644 --- a/utils/clearWeatherData.js +++ b/utils/clearWeatherData.js @@ -1,12 +1,7 @@ const { Op } = require('sequelize'); const Weather = require('../models/Weather'); -const Logger = require('./Logger'); -const logger = new Logger(); -const loadConfig = require('./loadConfig'); const clearWeatherData = async () => { - const { WEATHER_API_KEY: secret } = await loadConfig(); - const weather = await Weather.findOne({ order: [['createdAt', 'DESC']], }); @@ -20,10 +15,6 @@ const clearWeatherData = async () => { }, }); } - - if (secret) { - logger.log('Old weather data was deleted'); - } }; module.exports = clearWeatherData; diff --git a/utils/jobs.js b/utils/jobs.js index 9716af0..0ce3284 100644 --- a/utils/jobs.js +++ b/utils/jobs.js @@ -15,7 +15,7 @@ const weatherJob = schedule.scheduleJob( try { const weatherData = await getExternalWeather(); - logger.log('Weather updated'); + Sockets.getSocket('weather').socket.send(JSON.stringify(weatherData)); } catch (err) { if (secret) {