diff --git a/NKC_WF/Controllers/PrintQueueController.cs b/NKC_WF/Controllers/PrintQueueController.cs index 9a00e39..a38740a 100644 --- a/NKC_WF/Controllers/PrintQueueController.cs +++ b/NKC_WF/Controllers/PrintQueueController.cs @@ -2,6 +2,7 @@ using Newtonsoft.Json; using NKC_SDK; using SteamWare; +using System; using System.Collections.Generic; using System.Data; using System.IO; @@ -27,10 +28,10 @@ namespace NKC_WF.Controllers { int answ = 0; // resetto conteggio in redis... - DS_Report.PrintJobQueueDataTable nextJob = DataLayer.man.taPJQ.getWaiting(); - if (nextJob != null) + DS_Report.PrintJobQueueDataTable tabPJQ = DataLayer.man.taPJQ.getWaiting(); + if (tabPJQ != null) { - answ = nextJob.Count; + answ = tabPJQ.Count; } return answ; } @@ -153,7 +154,9 @@ namespace NKC_WF.Controllers } else { - // recupero da dbe e salvo + // chiudo gli zombie (stampe non chiuse)... + DataLayer.man.taPJQ.chiudiZoombie(DateTime.Now.AddMilliseconds(-memLayer.ML.CRI("zombieMsTime"))); + // recupero da db e salvo answ = countWaitingDb; memLayer.ML.setRSV(redQueueCount, answ.ToString(), memLayer.ML.CRI("cacheQueueSec")); } @@ -222,7 +225,7 @@ namespace NKC_WF.Controllers int.TryParse(printAnsw.ticketNum, out idxPJQ); DataLayer.man.taPJQ.updateStato(idxPJQ, printAnsw.newStatus); // resetto conteggio in redis... - memLayer.ML.setRSV(redQueueCount, countWaitingDb.ToString(), 30); + memLayer.ML.setRSV(redQueueCount, countWaitingDb.ToString(), memLayer.ML.CRI("cacheQueueSec")); answ = "OK"; } } @@ -233,6 +236,5 @@ namespace NKC_WF.Controllers } #endregion - } }