mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 15:16:31 +00:00
refactor external clients
put model batch size as parameter in config
This commit is contained in:
@@ -11,10 +11,10 @@ public class RemoteCommand(CommandType commandType, byte[]? data = null)
|
||||
[Key("Data")]
|
||||
public byte[]? Data { get; set; } = data;
|
||||
|
||||
public static byte[] Serialize<T>(CommandType commandType, T data) where T : class
|
||||
public static RemoteCommand Create<T>(CommandType commandType, T data) where T : class
|
||||
{
|
||||
var dataBytes = MessagePackSerializer.Serialize(data);
|
||||
return MessagePackSerializer.Serialize(new RemoteCommand(commandType, dataBytes ));
|
||||
return new RemoteCommand(commandType, dataBytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -1,11 +1,16 @@
|
||||
namespace Azaion.CommonSecurity.DTO;
|
||||
|
||||
public class PythonConfig
|
||||
public abstract class ExternalClientConfig
|
||||
{
|
||||
public string ZeroMqHost { get; set; } = "";
|
||||
public int ZeroMqPort { get; set; }
|
||||
public double OneTryTimeoutSeconds { get; set; }
|
||||
public int RetryCount {get;set;}
|
||||
}
|
||||
|
||||
public class InferenceClientConfig : ExternalClientConfig
|
||||
{
|
||||
public string ResourcesFolder { get; set; } = "";
|
||||
}
|
||||
|
||||
public class GpsDeniedClientConfig : ExternalClientConfig;
|
||||
@@ -2,5 +2,6 @@
|
||||
|
||||
public class SecureAppConfig
|
||||
{
|
||||
public PythonConfig PythonConfig { get; set; } = null!;
|
||||
public InferenceClientConfig InferenceClientConfig { get; set; } = null!;
|
||||
public GpsDeniedClientConfig GpsDeniedClientConfig { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user