Create seperate UdpSender for priority messages

This commit is contained in:
April P. committed 2024-12-17 21:47:56 -08:00
1 parent 589378e699
commit 370d79a049
1 file changed
+5 -2
+5 -2
View File
@@ -25,14 +25,17 @@ public class Program
Log.Info("Starting i2ME...");
Config config = Config.Load();
UdpSender sender = new UdpSender();
UdpSender routineSender = new UdpSender(config.UnitConfig.I2MsgAddress, config.UnitConfig.RoutineMsgPort,
config.UnitConfig.InterfaceAddress);
UdpSender prioritySender = new UdpSender(config.UnitConfig.I2MsgAddress, config.UnitConfig.PriorityMsgPort,
config.UnitConfig.InterfaceAddress);
Log.SetLogLevel(config.LogLevel);
string[] locations = { "USWA0028" };
// string[] locations = await GetMachineLocations(config);
Task hourlyRecordGen = TimedTasks.HourlyRecordCollection(locations, sender);
Task hourlyRecordGen = TimedTasks.HourlyRecordCollection(locations, routineSender);
Task cleanTempDir = TimedTasks.CleanTempDirectory();
await Task.WhenAll(hourlyRecordGen, cleanTempDir);