reorganization + multicast works on Linux!
This commit is contained in:
16
main.py
16
main.py
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user