diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index 5b0454a..07c324c 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
WebDoorCreator - Egalware
- Version: 0.9.2305.2416
+ Version: 0.9.2305.2417
Release note:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index 23cadfc..d5439f6 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-0.9.2305.2416
+0.9.2305.2417
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index f624d20..7168dae 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,7 +1,7 @@
-
- 0.9.2305.2416
- http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip
+ 0.9.2305.2417
+ http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.API.zip
http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html
false
diff --git a/WebDoorCreator.API/Controllers/QueueController.cs b/WebDoorCreator.API/Controllers/QueueController.cs
index b1c00dd..cab3dfe 100644
--- a/WebDoorCreator.API/Controllers/QueueController.cs
+++ b/WebDoorCreator.API/Controllers/QueueController.cs
@@ -81,6 +81,19 @@ namespace WebDoorCreator.API.Controllers
return answ;
}
+ ///
+ /// Reset della coda di processing x evitare condizioni di "stuck in calc"
+ ///
+ ///
+ [HttpPost("ResetQueueProcessing")]
+ public async Task ResetQueueProcessing()
+ {
+ string answ = "NA";
+ bool fatto = await QDataServ.ResetQueueProcessing();
+ answ = fatto ? "OK" : "NO";
+ return answ;
+ }
+
///
/// Invio elenco risultati elaborazioni (modalità boolean di esecuzione corretta)
///
@@ -130,8 +143,6 @@ namespace WebDoorCreator.API.Controllers
return actQueue;
}
-
-
#endregion Public Methods
#region Private Fields
diff --git a/WebDoorCreator.API/appsettings.json b/WebDoorCreator.API/appsettings.json
index e32a2b4..6e7fdde 100644
--- a/WebDoorCreator.API/appsettings.json
+++ b/WebDoorCreator.API/appsettings.json
@@ -26,5 +26,8 @@
"Admin": "samuele@steamware.net",
"ProjCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
"TimbCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com"
+ },
+ "RumtimeOpt": {
+ "VetoRemoveProcessing": 5
}
}
diff --git a/WebDoorCreator.Data/Services/QueueDataService.cs b/WebDoorCreator.Data/Services/QueueDataService.cs
index 5567d82..3825650 100644
--- a/WebDoorCreator.Data/Services/QueueDataService.cs
+++ b/WebDoorCreator.Data/Services/QueueDataService.cs
@@ -13,6 +13,7 @@ namespace WebDoorCreator.Data.Services
{
#region Public Constructors
+ private int vetoRemoveProcSec { get; set; } = 10;
///
/// Init classe
///
@@ -38,6 +39,8 @@ namespace WebDoorCreator.Data.Services
// setup canali pub/sub
CalcReqPipe = new MessagePipe(redisConn, Constants.CALC_REQ_QUEUE);
CalcDonePipe = new MessagePipe(redisConn, Constants.CALC_DONE_QUEUE);
+ // leggo conf speciali
+ vetoRemoveProcSec = _configuration.GetValue("RumtimeOpt:VetoRemoveProcessing");
}
#endregion Public Constructors
@@ -595,13 +598,16 @@ namespace WebDoorCreator.Data.Services
}
///
- /// Upsert for single hash record
+ /// Upsert for single hash record in processing
///
/// Dictionary of DoorId, saveVersNumb
public async Task RequestProcessingUpsert(string doorId, string vers)
{
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC);
long numReq = await RedHashUpsert(currKey, doorId, vers);
+ // aggiungo cache veto rimozione da coda processing
+ RedisKey currVetoKey = new RedisKey($"{Constants.CALC_REQ_PROC}:{doorId}");
+ await redisDb.StringSetAsync(currVetoKey, vers, TimeSpan.FromSeconds(vetoRemoveProcSec));
return numReq;
}
@@ -706,6 +712,37 @@ namespace WebDoorCreator.Data.Services
Log.Debug($"ResetQueue | REDIS EXEC in: {ts.TotalMilliseconds} ms");
return fatto;
}
+ ///
+ /// Reset to queue request all processing stuck data (veto check)
+ ///
+ /// Boolean, executed
+ public async Task ResetQueueProcessing()
+ {
+ bool fatto = false;
+ await Task.Delay(1);
+ Stopwatch stopWatch = new Stopwatch();
+ stopWatch.Start();
+ // cerco le richieste processing
+ RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC);
+ RedisKey currVetoKey = new RedisKey($"{Constants.CALC_REQ_PROC}:0");
+ var rawData = await redisDb.HashGetAllAsync(currKey);
+ foreach (var item in rawData)
+ {
+ // verifico SE siano senza veto rimozione...
+ currVetoKey = new RedisKey($"{Constants.CALC_REQ_PROC}:{item.Name}");
+ var redisVal = await redisDb.StringGetAsync(currVetoKey);
+ if (!redisVal.HasValue)
+ {
+ await RequestPendingUpsert(item.Name!, item.Value!);
+ await RequestProcessingRemove(item.Name!);
+ fatto = true;
+ }
+ }
+ stopWatch.Stop();
+ TimeSpan ts = stopWatch.Elapsed;
+ Log.Debug($"ResetQueueProcessing | REDIS EXEC in: {ts.TotalMilliseconds} ms");
+ return fatto;
+ }
///
/// Salvo elenco risultati elaborazioni (modalità boolean di esecuzione corretta)
diff --git a/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor b/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor
index 248695b..245b229 100644
--- a/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor
+++ b/WebDoorCreator.UI/Components/SvgComp/DoorSvgObj.razor
@@ -1,5 +1,4 @@