Fix makeRadarImages() not being awaited in main.py

This commit is contained in:
April
2022-10-17 23:03:56 -07:00
parent b2b412722d
commit ab7ff6fca0

View File

@ -1,7 +1,7 @@
import asyncio import asyncio
import logging,coloredlogs import logging,coloredlogs
from recordGenerators import DailyForecast,CurrentObservations,HourlyForecast,AirQuality,AirportDelays,PollenForecast,Breathing,Alerts from recordGenerators import DailyForecast,CurrentObservations,HourlyForecast,AirQuality,AirportDelays,PollenForecast,Breathing,Alerts
from radar import TWCRadarProcessor from radar import TWCRadarProcessor, RadarProcessor
l = logging.getLogger(__name__) l = logging.getLogger(__name__)
@ -23,7 +23,7 @@ async def grabAlertsLoop():
async def RadarProcessingLoop(): async def RadarProcessingLoop():
while True: while True:
TWCRadarProcessor.makeRadarImages() await TWCRadarProcessor.makeRadarImages()
await asyncio.sleep(30 * 60) await asyncio.sleep(30 * 60)
async def FiveMinUpdaters(): async def FiveMinUpdaters():
@ -47,7 +47,7 @@ async def main():
# Create loops # Create loops
asyncio.create_task(grabAlertsLoop()) asyncio.create_task(grabAlertsLoop())
asyncio.create_task(FiveMinUpdaters()) asyncio.create_task(FiveMinUpdaters())
asyncio.create_task(HourUpdaters) asyncio.create_task(HourUpdaters())
asyncio.create_task(RadarProcessingLoop()) asyncio.create_task(RadarProcessingLoop())
if __name__ == "__main__": if __name__ == "__main__":