diff --git a/Program.cs b/Program.cs index 61f81a6..85d9fa9 100644 --- a/Program.cs +++ b/Program.cs @@ -1,6 +1,5 @@ using franz; using Newtonsoft.Json; -using silver_messages.directorial; using System; using System.Collections.Generic; using System.Diagnostics; @@ -24,7 +23,7 @@ namespace directors_assistant Telefranz.Configure(name: conf.name, bootstrap_servers: conf.bootstrap_servers, commands: conf.commands.Select(c => c.name).ToList()); telefranz = Telefranz.Instance; - telefranz.addHandler((silver_messages.directorial.execute_command ec) => + telefranz.addHandler((gray_messages.directorial.execute_command ec) => { var matchedCommands = conf.commands.Where(c => c.name == ec.command)?.ToList(); //I swear I have a vague memory of foreach in linq'd query throwing an exception when results empty. @@ -57,7 +56,7 @@ namespace directors_assistant } }); await Task.Delay(1000); - telefranz.ProduceMessage(new silver_messages.global.sound_off()); + telefranz.ProduceMessage(new gray_messages.global.sound_off()); await Task.Delay(-1); } @@ -93,7 +92,7 @@ namespace directors_assistant { stopwatch.Stop(); Console.WriteLine($"{commandName} completed"); - telefranz.ProduceMessage(new silver_messages.directorial.command_completed() + telefranz.ProduceMessage(new gray_messages.directorial.command_completed() { command = commandName, runtimeMilliseconds = stopwatch.ElapsedMilliseconds, @@ -106,7 +105,7 @@ namespace directors_assistant { process.Kill(); Console.WriteLine($"{commandName} expired"); - telefranz.ProduceMessage(new silver_messages.directorial.command_expired() + telefranz.ProduceMessage(new gray_messages.directorial.command_expired() { command = commandName, stdout = string.Join('\n', outputs), @@ -126,7 +125,7 @@ namespace directors_assistant { return; } - telefranz.ProduceMessage(new silver_messages.directorial.command_output() + telefranz.ProduceMessage(new gray_messages.directorial.command_output() { stdout = e.Data, command = commandName, @@ -140,7 +139,7 @@ namespace directors_assistant return; } Console.Error.WriteLine($"{commandName} err (but not necessarily dead?): {e.Data}"); - telefranz.ProduceMessage(new silver_messages.directorial.command_error() + telefranz.ProduceMessage(new gray_messages.directorial.command_error() { stderr = e.Data, command = commandName, @@ -157,7 +156,7 @@ namespace directors_assistant process.WaitForExit(); stopwatch.Stop(); Console.WriteLine($"{commandName} returned {process.ExitCode} after {stopwatch.ElapsedMilliseconds}ms"); - telefranz.ProduceMessage(new silver_messages.directorial.command_completed() + telefranz.ProduceMessage(new gray_messages.directorial.command_completed() { command = commandName, runtimeMilliseconds = stopwatch.ElapsedMilliseconds, @@ -167,7 +166,7 @@ namespace directors_assistant catch(Exception e) { Console.Error.WriteLine($"{commandName} FATAL: {JsonConvert.SerializeObject(e)}"); - telefranz.ProduceMessage(new silver_messages.directorial.command_error() + telefranz.ProduceMessage(new gray_messages.directorial.command_error() { stderr = e.Message, command = commandName, diff --git a/directors-assistant.csproj b/directors-assistant.csproj index 65c2ff4..efa5538 100644 --- a/directors-assistant.csproj +++ b/directors-assistant.csproj @@ -12,7 +12,7 @@ - +