reorganization + multicast works on Linux!

This commit is contained in:
2025-10-20 22:35:35 -05:00
parent 28e56feef1
commit 0db078dbe4
28 changed files with 65 additions and 82 deletions

16
main.py
View File

@@ -1,8 +1,7 @@
import asyncio, aiofiles
from asyncio.log import logger
from asyncore import loop
import logging,coloredlogs
from radar import TWCRadarCollector
import logging
import os
from datetime import datetime
import recordTasks
@@ -13,7 +12,6 @@ with open("config.json", "r") as file:
cfg = json.load(file)
l = logging.getLogger(__name__)
coloredlogs.install(logger=l)
useRadarServer = cfg["useRadarServer"]
@@ -33,9 +31,9 @@ async def createTemp():
os.mkdir('./.temp/output/satrad')
# Create msgId file for bit.py
#async with aiofiles.open('./.temp/msgId.txt', 'w') as msgId:
#await msgId.write('694203')
#await msgId.close()
async with aiofiles.open('./.temp/msgId.txt', 'w') as msgId:
await msgId.write('694203')
await msgId.close()
else:
l.debug(".temp file exists")
return
@@ -44,8 +42,10 @@ async def createTemp():
async def main():
await createTemp()
mosaicTask = asyncio.create_task(recordTasks.updateMosaicTask())
satradTask = asyncio.create_task(recordTasks.updateSatradTask())
if useRadarServer:
mosaicTask = asyncio.create_task(recordTasks.updateMosaicTask())
satradTask = asyncio.create_task(recordTasks.updateSatradTask())
alertsTask = asyncio.create_task(recordTasks.alertsTask())
coTask = asyncio.create_task(recordTasks.coTask())
hfTask = asyncio.create_task(recordTasks.hfTask())