Alerts collector task

This commit is contained in:
April
2022-11-13 15:12:41 -07:00
parent ac2835e87e
commit 101b0545f3
2 changed files with 8 additions and 1 deletions

View File

@ -1,11 +1,16 @@
import asyncio
from recordGenerators import CurrentObservations,HourlyForecast,DailyForecast
from recordGenerators import Alerts,CurrentObservations,HourlyForecast,DailyForecast
""" This houses the tasks needed to update the data records concurrently
I have no idea if this is a messy way to do things, but it will be worked upon if it is.
"""
async def alertsTask():
while True:
await Alerts.makeRecord()
await asyncio.sleep(60)
async def coTask():
while True:
await CurrentObservations.makeDataFile()