diff --git a/EgwCoreLib.Lux.Data/Services/ProdService.cs b/EgwCoreLib.Lux.Data/Services/ProdService.cs
index 72fd1c16..ec48572c 100644
--- a/EgwCoreLib.Lux.Data/Services/ProdService.cs
+++ b/EgwCoreLib.Lux.Data/Services/ProdService.cs
@@ -28,9 +28,11 @@ namespace EgwCoreLib.Lux.Data.Services
queueRunKey = (RedisKey)$"{queueCalcKey}:Run";
queueWaitKey = (RedisKey)$"{queueCalcKey}:Wait";
#endif
+#if false
redisOrderDoneKey = $"{redisBaseKey}:OrderDone";
+ redisOrderRunKey = $"{redisBaseKey}:OrderRun";
redisOrderReqKey = $"{redisBaseKey}:OrderReq";
- redisOrderRunKey = $"{redisBaseKey}:OrderRun";
+#endif
Log.Info($"ProdService | Init OK");
}
@@ -64,7 +66,7 @@ namespace EgwCoreLib.Lux.Data.Services
// salvo su cache x successivo reinvio da currRequest
QuestionDTO calcRequest = new QuestionDTO(nId, currRequest.EnvType, currRequest.DictExec);
// salvo in cache contenuto della richiesta x UID
- string currKey = $"{redisOrderReqKey}:{reqUid.Replace("/", ":")}";
+ string currKey = $"{redisBaseKey}:{currRequest.EnvType}:{reqUid.Replace("/", ":")}";
done = await _redisService.SetAsync(currKey, calcRequest.sProcessArgs);
// invio ed accodo!
var qWaitKey = qKey(currRequest.EnvType, QueueType.waiting);
@@ -89,15 +91,16 @@ namespace EgwCoreLib.Lux.Data.Services
///
/// Restituzione singolo Job specifico dalla coda ORDINI
///
+ /// environment richiesto
///
///
- public async Task GetJob(string id)
+ public async Task GetJob(Constants.EXECENVIRONMENTS cEnv, string id)
{
Stopwatch sw = new Stopwatch();
sw.Start();
string result = "";
// recupero richiesta serializzata
- string currKey = $"{redisOrderReqKey}:{id.Replace("/", ":")}";
+ string currKey = $"{redisBaseKey}:{cEnv}:{id.Replace("/", ":")}";
var rawRes = await _redisService.GetAsync(currKey);
if (!string.IsNullOrEmpty(rawRes))
{
@@ -132,7 +135,7 @@ namespace EgwCoreLib.Lux.Data.Services
_redisService.QueuePush(qKey(cEnv, qType + 1), (RedisValue)reqUid);
}
// recupero richiesta serializzata
- string currKey = $"{redisOrderReqKey}:{reqUid.Replace("/", ":")}";
+ string currKey = $"{redisBaseKey}:{cEnv}:{reqUid.Replace("/", ":")}";
var rawRes = await _redisService.GetAsync(currKey);
if (!string.IsNullOrEmpty(rawRes))
{
@@ -351,11 +354,13 @@ namespace EgwCoreLib.Lux.Data.Services
private string redisBaseKey = "Lux:Prod";
+#if false
private string redisOrderDoneKey = "";
-
+ private string redisOrderRunKey = "";
private string redisOrderReqKey = "";
+#endif
+
- private string redisOrderRunKey = "";
#endregion Private Fields
diff --git a/Lux.API/Controllers/ProdController.cs b/Lux.API/Controllers/ProdController.cs
index aa3bb6cb..612f4c93 100644
--- a/Lux.API/Controllers/ProdController.cs
+++ b/Lux.API/Controllers/ProdController.cs
@@ -54,15 +54,20 @@ namespace Lux.API.Controllers
}
///
- /// Chiamata GET:
+ /// Chiamata GET:
/// - fornisce il job da eseguire dalla coda (SE presente)
- /// GET: api/Prod/getjob/ABC012345
+ /// GET: api/Prod/getjob/BEAM/ABC012345
+ /// GET: api/Prod/getjob/WINDOW/ABC012345
///
+ ///
+ ///
///
- [HttpGet("getjob/{uid}")]
- public async Task> GetJob(string uid)
+ [HttpGet("getjob/{envir}/{uid}")]
+ public async Task> GetJob(string envir, string uid)
{
- var result = await PService.GetJob(uid);
+ Constants.EXECENVIRONMENTS cEnvir = Constants.EXECENVIRONMENTS.WINDOW;
+ Enum.TryParse(envir, out cEnvir);
+ var result = await PService.GetJob(cEnvir, uid);
QuestionDTO? deserRes = JsonConvert.DeserializeObject(result);
if (deserRes != null)
{
@@ -75,7 +80,9 @@ namespace Lux.API.Controllers
deserRes.Args.Remove("RUID");
}
// lo aggiungo!
- string envir = $"{deserRes.ExecEnvironment}";
+#if false
+ string envir = $"{deserRes.ExecEnvironment}";
+#endif
var mode = deserRes.Args["Mode"];
var sub = deserRes.Args["SubMode"];
string type = string.IsNullOrEmpty(sub) ? mode : $"{mode}-{sub}";
@@ -219,7 +226,7 @@ namespace Lux.API.Controllers
///
/// Environment della richiesta
///
- [HttpGet("qstatus")]
+ [HttpGet("qstatus/{envir}")]
public async Task QueueStatus(string envir)
{
Stopwatch sw = new Stopwatch();
@@ -227,11 +234,13 @@ namespace Lux.API.Controllers
Constants.EXECENVIRONMENTS cEnvir = Constants.EXECENVIRONMENTS.WINDOW;
Enum.TryParse(envir, out cEnvir);
Dictionary queueStatus = new Dictionary();
- long numWait = await PService.QueueLen(cEnvir, QueueType.waiting);
+ long numDone = await PService.QueueLen(cEnvir, QueueType.done);
long numRun = await PService.QueueLen(cEnvir, QueueType.running);
+ long numWait = await PService.QueueLen(cEnvir, QueueType.waiting);
// simulo status...
queueStatus.Add("waiting", numWait);
queueStatus.Add("running", numRun);
+ queueStatus.Add("done", numDone);
sw.Stop();
Log.Info($"QueueStatus | {sw.Elapsed.TotalMilliseconds:N3} ms");
return Ok(queueStatus);
diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj
index 360f70c6..423bf527 100644
--- a/Lux.API/Lux.API.csproj
+++ b/Lux.API/Lux.API.csproj
@@ -4,7 +4,7 @@
net8.0
enable
enable
- 1.1.2602.0919
+ 1.1.2602.1009
diff --git a/Lux.UI/Components/Compo/OrderRowMan.razor.cs b/Lux.UI/Components/Compo/OrderRowMan.razor.cs
index 2e218f1d..60b79a3b 100644
--- a/Lux.UI/Components/Compo/OrderRowMan.razor.cs
+++ b/Lux.UI/Components/Compo/OrderRowMan.razor.cs
@@ -783,13 +783,13 @@ namespace Lux.UI.Components.Compo
///
protected async Task ReRunJob()
{
- if (WorkLoadRecord != null)
+ if (WorkLoadRecord != null && SelRecord!=null)
{
if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler rimettere in coda il calcolo?"))
return;
string JobCode = $"ORDER:ESTIMATE:{WorkLoadRecord.UID}";
- await PService.ReRunJob(JobCode);
+ await PService.ReRunJob(SelRecord.Envir, JobCode);
}
}
diff --git a/Lux.UI/Components/Pages/Orders.razor.cs b/Lux.UI/Components/Pages/Orders.razor.cs
index 67efc279..30de043b 100644
--- a/Lux.UI/Components/Pages/Orders.razor.cs
+++ b/Lux.UI/Components/Pages/Orders.razor.cs
@@ -134,8 +134,11 @@ namespace Lux.UI.Components.Pages
if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler rimettere in coda il calcolo?"))
return;
- await PService.ReRunJob(JobCode);
- await UpdateJobQueue();
+ if (EditStateRec != null)
+ {
+ await PService.ReRunJob(EditStateRec.Envir, JobCode);
+ await UpdateJobQueue(EditStateRec.Envir);
+ }
}
}
@@ -163,8 +166,11 @@ namespace Lux.UI.Components.Pages
if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler resettarela coda di run calcolo? Le richieste verranno riaccodate in waiting."))
return;
- await PService.ResetRunning();
- await UpdateJobQueue();
+ if (EditStateRec != null)
+ {
+ await PService.ResetRunning(EditStateRec.Envir);
+ await UpdateJobQueue(EditStateRec.Envir);
+ }
}
///
@@ -175,9 +181,11 @@ namespace Lux.UI.Components.Pages
{
if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler resettarela coda di attesa calcolo eliminando le richieste in attesa? L'operazione non è revertibile."))
return;
-
- await PService.QueueResetAsync(ProdService.QueueType.waiting);
- await UpdateJobQueue();
+ if (EditStateRec != null)
+ {
+ await PService.QueueResetAsync(EditStateRec.Envir, ProdService.QueueType.waiting);
+ await UpdateJobQueue(EditStateRec.Envir);
+ }
}
///
@@ -301,7 +309,7 @@ namespace Lux.UI.Components.Pages
}
}
- await UpdateJobQueue();
+ await UpdateJobQueue(currRec.Envir);
}
#endregion Protected Methods
@@ -478,12 +486,15 @@ namespace Lux.UI.Components.Pages
///
/// Modalità gestione code calcolo + display history
///
- ///
- private async Task ManageCalcReq(OrderModel? curRec)
+ ///
+ private async Task ManageCalcReq(OrderModel? currRec)
{
- EditStateRec = curRec;
- OrderHist = curRec != null ? curRec.LogHistory : new List();
- await UpdateJobQueue();
+ EditStateRec = currRec;
+ OrderHist = currRec != null ? currRec.LogHistory : new List();
+ if (currRec != null)
+ {
+ await UpdateJobQueue(currRec.Envir);
+ }
}
///
@@ -543,12 +554,12 @@ namespace Lux.UI.Components.Pages
listBord01.Add("");
}
- private async Task UpdateJobQueue()
+ private async Task UpdateJobQueue(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS envir)
{
// aggiorno coda corrente x display...
- var currQueueWait = await PService.QueueListAllAsync(ProdService.QueueType.waiting);
- var currQueueRun = await PService.QueueListAllAsync(ProdService.QueueType.running);
- var currQueueDone = await PService.QueueListAllAsync(ProdService.QueueType.done);
+ var currQueueWait = await PService.QueueListAllAsync(envir, ProdService.QueueType.waiting);
+ var currQueueRun = await PService.QueueListAllAsync(envir, ProdService.QueueType.running);
+ var currQueueDone = await PService.QueueListAllAsync(envir, ProdService.QueueType.done);
// converto x display...
JobQueueWait = currQueueWait.Select(x => $"{x}").ToList();
JobQueueRun = currQueueRun.Select(x => $"{x}").ToList();
diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj
index 8151c5e1..23943f68 100644
--- a/Lux.UI/Lux.UI.csproj
+++ b/Lux.UI/Lux.UI.csproj
@@ -5,7 +5,7 @@
enable
enable
aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50
- 1.1.2602.0918
+ 1.1.2602.1009
diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index dfb3d006..07fb16ba 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
LUX - Web Windows MES
- Versione: 1.1.2602.0919
+ Versione: 1.1.2602.1009
Note di rilascio:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index 84a417ea..51b62139 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-1.1.2602.0919
+1.1.2602.1009
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index 709fdbe3..0ca636eb 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.1.2602.0919
+ 1.1.2602.1009
http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip
http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html
false