move zmq port to config file for C# and python

This commit is contained in:
Alex Bezdieniezhnykh
2025-02-16 16:35:52 +02:00
parent 0d6ea4264f
commit 2ecbc9bfd4
17 changed files with 80 additions and 180 deletions
@@ -19,7 +19,6 @@ public interface IAuthProvider
User CurrentUser { get; }
}
public class PythonResourceLoader : IResourceLoader, IAuthProvider
{
private readonly DealerSocket _dealer = new();
@@ -27,11 +26,11 @@ public class PythonResourceLoader : IResourceLoader, IAuthProvider
public User CurrentUser { get; set; } = null!;
public PythonResourceLoader()
public PythonResourceLoader(PythonConfig config)
{
StartPython();
//StartPython();
_dealer.Options.Identity = Encoding.UTF8.GetBytes(_clientId.ToString("N"));
_dealer.Connect($"tcp://{SecurityConstants.ZMQ_HOST}:{SecurityConstants.ZMQ_PORT}");
_dealer.Connect($"tcp://{config.ZeroMqHost}:{config.ZeroMqPort}");
}
private void StartPython()