major rewrite
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import asyncio
|
||||
from recordGenerators import Alerts,CurrentObservations,HourlyForecast,DailyForecast, AirQuality, AirportDelays, AchesAndPains, Breathing, HeatingAndCooling, MosquitoActivity, PollenForecast, TideForecast, WateringNeeds
|
||||
from recordGenerators import alerts,currentObservations,hourlyForecast,dailyForecast, airQuality, airportDelays, achesAndPains, breathing, heatingAndCooling, mosquitoActivity, pollenForecast, tideForecast, wateringNeeds
|
||||
from radar import TWCRadarCollector
|
||||
from datetime import datetime
|
||||
|
||||
@@ -25,67 +25,67 @@ async def updateSatradTask():
|
||||
|
||||
async def alertsTask():
|
||||
while True:
|
||||
await Alerts.makeRecord()
|
||||
await alerts.makeRecord()
|
||||
await asyncio.sleep(60)
|
||||
|
||||
async def coTask():
|
||||
while True:
|
||||
await CurrentObservations.makeDataFile()
|
||||
await currentObservations.makeDataFile()
|
||||
await asyncio.sleep(5 * 60)
|
||||
|
||||
# These tasks should be updated every hour
|
||||
|
||||
async def hfTask():
|
||||
while True:
|
||||
await HourlyForecast.makeDataFile()
|
||||
await hourlyForecast.makeDataFile()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def dfTask():
|
||||
while True:
|
||||
await DailyForecast.makeDataFile()
|
||||
await dailyForecast.makeDataFile()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def aqTask():
|
||||
while True:
|
||||
await AirQuality.writeData()
|
||||
await airQuality.writeData()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def aptTask():
|
||||
while True:
|
||||
await AirportDelays.writeData()
|
||||
await airportDelays.writeData()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def apTask():
|
||||
while True:
|
||||
await AchesAndPains.makeRecord()
|
||||
await achesAndPains.makeRecord()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def brTask():
|
||||
while True:
|
||||
await Breathing.makeDataFile()
|
||||
await breathing.makeDataFile()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def hcTask():
|
||||
while True:
|
||||
await HeatingAndCooling.makeRecord()
|
||||
await heatingAndCooling.makeRecord()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def maTask():
|
||||
while True:
|
||||
await MosquitoActivity.makeRecord()
|
||||
await mosquitoActivity.makeRecord()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def pTask():
|
||||
while True:
|
||||
await PollenForecast.makeDataFile()
|
||||
await pollenForecast.makeDataFile()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def tTask():
|
||||
while True:
|
||||
await TideForecast.makeRecord()
|
||||
await tideForecast.makeRecord()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
async def wnTask():
|
||||
while True:
|
||||
await WateringNeeds.makeRecord()
|
||||
await wateringNeeds.makeRecord()
|
||||
await asyncio.sleep(60 * 60)
|
||||
|
||||
Reference in New Issue
Block a user