Fix NetMQ not stopping.
This commit is contained in:
+11
-18
@@ -33,14 +33,6 @@ public static class Commands
|
||||
Console.WriteLine(SendAndRecieveStringMessage(communicationObject));
|
||||
}
|
||||
|
||||
public static void GarbageCollect()
|
||||
{
|
||||
CommunicationObject communicationObject = new();
|
||||
communicationObject.Command = CommunicationCommand.GarbageCollect;
|
||||
|
||||
Console.WriteLine(SendAndRecieveStringMessage(communicationObject));
|
||||
}
|
||||
|
||||
public static void Vacuum()
|
||||
{
|
||||
CommunicationObject communicationObject = new();
|
||||
@@ -59,15 +51,16 @@ public static class Commands
|
||||
|
||||
public static void GetHelp()
|
||||
{
|
||||
Console.WriteLine("Available commands:" + '\n');
|
||||
Console.WriteLine(" stop - stops the server" + '\n');
|
||||
Console.WriteLine(" clear - clears the console" + '\n');
|
||||
Console.WriteLine(" q - quits the program" + '\n');
|
||||
Console.WriteLine(" p - print the progress information of the scanner" + '\n');
|
||||
Console.WriteLine(" g - manual garbage collect on the server" + '\n');
|
||||
Console.WriteLine(" r - manual reindex the databases" + '\n');
|
||||
Console.WriteLine(" v - manual vacuum the databases" + '\n');
|
||||
Console.WriteLine(" help - shows this help" + '\n');
|
||||
Console.WriteLine("Available commands:");
|
||||
Console.WriteLine(" stop - stops the server");
|
||||
Console.WriteLine(" clear - clears the console");
|
||||
Console.WriteLine(" q - quits the program");
|
||||
Console.WriteLine(" p - print the progress information of the scanner");
|
||||
Console.WriteLine(" g - manual garbage collect on the server");
|
||||
Console.WriteLine(" r - manual reindex the databases");
|
||||
Console.WriteLine(" v - manual vacuum the databases");
|
||||
Console.WriteLine(" help - shows this help");
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
private static string SendAndRecieveStringMessage(CommunicationObject communicationObject)
|
||||
@@ -79,7 +72,7 @@ public static class Commands
|
||||
client.SendFrame(bytes);
|
||||
byte[] msg = client.ReceiveFrameBytes();
|
||||
client.Close();
|
||||
return MessagePackSerializer.Deserialize<string>(msg, MessagePackSerializerOptions.Standard.WithCompression(MessagePackCompression.Lz4BlockArray));;
|
||||
return MessagePackSerializer.Deserialize<string>(msg, MessagePackSerializerOptions.Standard.WithCompression(MessagePackCompression.Lz4BlockArray));
|
||||
}
|
||||
|
||||
private static ScanningStatus GetProgress(CommunicationObject communicationObject)
|
||||
|
||||
@@ -26,11 +26,6 @@ do
|
||||
Commands.GetProgress();
|
||||
}
|
||||
|
||||
else if (string.Equals(input, "g"))
|
||||
{
|
||||
Commands.GarbageCollect();
|
||||
}
|
||||
|
||||
else if (string.Equals(input, "v"))
|
||||
{
|
||||
Commands.Vacuum();
|
||||
|
||||
@@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Manager")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f3c6338a6ae57d4e839090fca125bc38f764d016")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Manager")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Manager")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
f2edcd1f3bfbc6ac17d0373459972a7238e7e008421899c57c54c58830729d72
|
||||
0fa3b16d3588ae8d59b20d58a27e925f7ee529b8ffe8d511b4d20b1ba1172bd0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Manager")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+981960411028790aaa0b551986f102c57a5995a2")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f3c6338a6ae57d4e839090fca125bc38f764d016")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Manager")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Manager")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
17839627f63727ed46df8c31fee63615d813cf203af1f1d26871eb358af64608
|
||||
cfcb6224cd1285029a88d6c786b98af9c68745343590d6b3a5e7df3d1051b9d0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user