Merge branch 'release/IobManMultiClient_06'
This commit is contained in:
+11
-5
@@ -213,8 +213,7 @@ namespace IOB_MAN
|
||||
{
|
||||
forceKillByName(item.Value.ExeName);
|
||||
}
|
||||
//closeAllChild(true);
|
||||
Thread.Sleep(250);
|
||||
Thread.Sleep(100);
|
||||
// avvio i child
|
||||
foreach (var item in IobList)
|
||||
{
|
||||
@@ -1551,6 +1550,7 @@ namespace IOB_MAN
|
||||
/// <param name="indice">posizione (opzionale) in lista</param>
|
||||
private void startChildProc(string tgtName, string codIob, int indice = -1)
|
||||
{
|
||||
Stopwatch sw = Stopwatch.StartNew();
|
||||
ProcessStartInfo psi = null;
|
||||
// da testare x aprire chiudere risorsa...
|
||||
string TargetExe = utils.CRS("targetExe");
|
||||
@@ -1579,9 +1579,13 @@ namespace IOB_MAN
|
||||
Process p = Process.Start(psi);
|
||||
|
||||
// accodo nuovo IOB...
|
||||
iobAdapt newIob = new iobAdapt();
|
||||
DateTime adesso = DateTime.Now;
|
||||
newIob.redisMan = new RedisIobCache("", codIob);
|
||||
iobAdapt newIob = new iobAdapt("", codIob);
|
||||
utils.lgInfo($"startChildProc Step 01 | {codIob} | {sw.ElapsedMilliseconds}ms");
|
||||
#if false
|
||||
newIob.redisMan = new RedisIobCache("", codIob);
|
||||
#endif
|
||||
utils.lgInfo($"startChildProc Step 02 | {codIob} | {sw.ElapsedMilliseconds}ms");
|
||||
newIob.CodIOB = codIob;
|
||||
newIob.TgtName = tgtName;
|
||||
//newIob.ExeName = p.ProcessName;
|
||||
@@ -1590,6 +1594,7 @@ namespace IOB_MAN
|
||||
newIob.startTime = adesso;
|
||||
newIob.pID = p.Id;
|
||||
newIob.isRunning = true;
|
||||
utils.lgInfo($"startChildProc Step 03 | {codIob} | {sw.ElapsedMilliseconds}ms");
|
||||
// aggiungo a datasource, se indice -1 aggiungendo e basta, altrimenti alla posizione richiesta...
|
||||
if (indice == -1)
|
||||
{
|
||||
@@ -1599,7 +1604,8 @@ namespace IOB_MAN
|
||||
{
|
||||
ElencoIOB.Insert(indice, newIob);
|
||||
}
|
||||
utils.lgInfo($"Avviato child process per {codIob} | pid: {p.Id}");
|
||||
sw.Stop();
|
||||
utils.lgInfo($"Avviato child process per {codIob} | pid: {p.Id} | {sw.ElapsedMilliseconds}ms");
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
|
||||
+4
-4
@@ -218,7 +218,7 @@ namespace IOB_MAN
|
||||
/// <summary>
|
||||
/// Oggetto statico connessione redis
|
||||
/// </summary>
|
||||
public ConnectionMultiplexer connRedis
|
||||
public static ConnectionMultiplexer connRedis
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -229,7 +229,7 @@ namespace IOB_MAN
|
||||
/// <summary>
|
||||
/// Oggetto statico connessione redis
|
||||
/// </summary>
|
||||
public ConnectionMultiplexer connRedisAdmin
|
||||
public static ConnectionMultiplexer connRedisAdmin
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -1125,7 +1125,7 @@ namespace IOB_MAN
|
||||
/// <summary>
|
||||
/// Connessione lazy a redis...
|
||||
/// </summary>
|
||||
private Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
|
||||
private static Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
|
||||
{
|
||||
string RedisConn = utils.CRS("RedisConn");
|
||||
if (string.IsNullOrEmpty(RedisConn))
|
||||
@@ -1139,7 +1139,7 @@ namespace IOB_MAN
|
||||
/// <summary>
|
||||
/// Connessione lazy a redis...
|
||||
/// </summary>
|
||||
private Lazy<ConnectionMultiplexer> lazyConnectionAdmin = new Lazy<ConnectionMultiplexer>(() =>
|
||||
private static Lazy<ConnectionMultiplexer> lazyConnectionAdmin = new Lazy<ConnectionMultiplexer>(() =>
|
||||
{
|
||||
string RedisConnAdmin = utils.CRS("RedisConnAdmin");
|
||||
if (string.IsNullOrEmpty(RedisConnAdmin))
|
||||
|
||||
@@ -8,6 +8,21 @@ namespace IOB_MAN
|
||||
// </Auto-Generated>
|
||||
public class iobAdapt
|
||||
{
|
||||
/// <summary>
|
||||
/// Costruttore base senza init speciali
|
||||
/// </summary>
|
||||
public iobAdapt() { }
|
||||
|
||||
/// <summary>
|
||||
/// Costruttore con init redis
|
||||
/// </summary>
|
||||
/// <param name="codServer"></param>
|
||||
/// <param name="codIob"></param>
|
||||
public iobAdapt(string codServer, string codIob)
|
||||
{
|
||||
redisMan = new RedisIobCache(codServer, codIob);
|
||||
}
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user