Correzioni warnings vari e test compilazione, fix applicazioni CORE in generale
This commit is contained in:
@@ -1319,7 +1319,7 @@ namespace MP.IOC.Data
|
||||
/// Restitusice elenco fasi
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Task<List<AnagGruppiModel>> ElencoGruppiFase()
|
||||
public async Task<List<AnagGruppiModel>> ElencoGruppiFaseAsync()
|
||||
{
|
||||
List<AnagGruppiModel> result = new List<AnagGruppiModel>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
@@ -1327,7 +1327,7 @@ namespace MP.IOC.Data
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisAnagGruppi}";
|
||||
// cerco in redis dato valOut sel macchina...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
var rawResult = JsonConvert.DeserializeObject<List<AnagGruppiModel>>($"{rawData}");
|
||||
@@ -1339,10 +1339,10 @@ namespace MP.IOC.Data
|
||||
}
|
||||
else
|
||||
{
|
||||
result = SpecDbController.AnagGruppiFase();
|
||||
result = await SpecDbController.AnagGruppiFaseAsync();
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache / 5));
|
||||
await redisDb.StringSetAsync(currKey, rawData, getRandTOut(redisLongTimeCache / 5));
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
@@ -1350,17 +1350,10 @@ namespace MP.IOC.Data
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ElencoGruppiFase | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
return Task.FromResult(result);
|
||||
Log.Debug($"ElencoGruppiFaseAsync | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
#if false
|
||||
public Task<List<LinkMenuModel>> ElencoLinkAsync()
|
||||
{
|
||||
return SpecDbController.ElencoLinkAsync();
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunta record EventList
|
||||
/// </summary>
|
||||
@@ -1803,7 +1796,7 @@ namespace MP.IOC.Data
|
||||
/// </summary>
|
||||
/// <param name="IdxOdl">idxMacc odl da cercare</param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<AnagGiacenzeModel>> ListGiacenze(int IdxOdl)
|
||||
public async Task<List<AnagGiacenzeModel>> ListGiacenzeAsync(int IdxOdl)
|
||||
{
|
||||
List<AnagGiacenzeModel>? result = new List<AnagGiacenzeModel>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
@@ -1811,7 +1804,7 @@ namespace MP.IOC.Data
|
||||
string readType = "DB";
|
||||
string currKey = $"{Utils.redisGiacenzaList}:{IdxOdl}";
|
||||
// cerco in redis dato valOut sel macchina...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<AnagGiacenzeModel>>($"{rawData}");
|
||||
@@ -1819,10 +1812,10 @@ namespace MP.IOC.Data
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await Task.FromResult(SpecDbController.ListGiacenze(IdxOdl));
|
||||
result = await SpecDbController.ListGiacenzeAsync(IdxOdl);
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisShortTimeCache));
|
||||
await redisDb.StringSetAsync(currKey, rawData, TimeSpan.FromSeconds(redisShortTimeCache));
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
@@ -1830,7 +1823,7 @@ namespace MP.IOC.Data
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ListGiacenze | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
Log.Debug($"ListGiacenzeAsync | Read from {readType}: {ts.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user