fix tempo aggiornamento +
cache x parametri opzionali
This commit is contained in:
@@ -167,9 +167,17 @@ namespace MP.SPEC.Components
|
||||
{
|
||||
get => selMacchina != "*" || selFlux != "*";
|
||||
}
|
||||
protected int refreshRate = 2;
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
SelFilter = new SelectFluxParams();
|
||||
await MDService.ConfigResetCache();
|
||||
var result = await MDService.tryGetConfig("SPEC_ParamTempoAgg");
|
||||
if (result != null)
|
||||
{
|
||||
refreshRate = int.Parse(result);
|
||||
}
|
||||
selTempoAgg = refreshRate;
|
||||
setDtSnap();
|
||||
DateTime dtStart = SelFilter.dtMin != null ? (DateTime)SelFilter.dtMin : DateTime.Now.AddMonths(-1);
|
||||
DateTime dtEnd = SelFilter.dtMax != null ? (DateTime)SelFilter.dtMax : DateTime.Today.AddDays(1);
|
||||
|
||||
@@ -613,7 +613,11 @@ namespace MP.SPEC.Data
|
||||
result = await Task.FromResult(dbController.FluxLogGetLastFilt(DtMax, DtMin, IdxMacchina, CodFlux, MaxRec));
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisCacheSec / 2));
|
||||
var canCache = await tryGetConfig("SPEC_ParametriEnableReidsCache");
|
||||
if (canCache != "false")
|
||||
{
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisCacheSec / 2));
|
||||
}
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2212.919</Version>
|
||||
<Version>6.16.2212.1211</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2212.919</h4>
|
||||
<h4>Versione: 6.16.2212.1211</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2212.919
|
||||
6.16.2212.1211
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2212.919</version>
|
||||
<version>6.16.2212.1211</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user