Various Fix on QueueController

This commit is contained in:
Samuele E. Locatelli
2020-08-07 12:59:28 +02:00
parent b4c332fc1b
commit 9284088c36
+8 -6
View File
@@ -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
}
}