Update pagina composizione kit PODL
This commit is contained in:
@@ -2251,18 +2251,21 @@ namespace MP.SPEC.Data
|
||||
/// Elimina record + svuotamento cache
|
||||
/// </summary>
|
||||
/// <param name="currRecord"></param>
|
||||
public bool WipKitDelete(WipSetupKitModel currRecord)
|
||||
public async Task<bool> WipKitDeleteAsync(WipSetupKitModel currRecord)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("WipKitDelete");
|
||||
using var activity = ActivitySource.StartActivity("WipKitDeleteAsync");
|
||||
string source = "DB";
|
||||
bool fatto = false;
|
||||
// salvo
|
||||
fatto = dbController.WipKitDelete(currRecord);
|
||||
fatto = await dbController.WipKitDeleteAsync(currRecord);
|
||||
// svuoto cache
|
||||
EmptyWipCache();
|
||||
await FlushCacheByTagAsync(Utils.redisKitWip);
|
||||
#if false
|
||||
EmptyWipCache();
|
||||
#endif
|
||||
activity?.SetTag("data.source", source);
|
||||
activity?.Stop();
|
||||
LogTrace($"WipKitDelete Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
|
||||
LogTrace($"WipKitDeleteAsync Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
|
||||
return fatto;
|
||||
}
|
||||
|
||||
@@ -2270,18 +2273,21 @@ namespace MP.SPEC.Data
|
||||
/// Elimina i record più vecchi della data-ora indicata
|
||||
/// </summary>
|
||||
/// <param name="DateLimit"></param>
|
||||
public bool WipKitDeleteOlder(DateTime DateLimit)
|
||||
public async Task<bool> WipKitDeleteOlderAsync(DateTime DateLimit)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("WipKitDeleteOlder");
|
||||
using var activity = ActivitySource.StartActivity("WipKitDeleteOlderAsync");
|
||||
string source = "DB";
|
||||
bool fatto = false;
|
||||
// salvo
|
||||
fatto = dbController.WipKitDeleteOlder(DateLimit);
|
||||
// svuoto cache
|
||||
EmptyWipCache();
|
||||
fatto = await dbController.WipKitDeleteOlderAsync(DateLimit);
|
||||
// svuoto cache KitWip
|
||||
await FlushCacheByTagAsync(Utils.redisKitWip);
|
||||
#if false
|
||||
EmptyWipCache();
|
||||
#endif
|
||||
activity?.SetTag("data.source", source);
|
||||
activity?.Stop();
|
||||
LogTrace($"WipKitDeleteOlder Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
|
||||
LogTrace($"WipKitDeleteOlderAsync Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
|
||||
return fatto;
|
||||
}
|
||||
|
||||
@@ -2306,18 +2312,21 @@ namespace MP.SPEC.Data
|
||||
/// Esegue salvataggio record + svuotamento cache
|
||||
/// </summary>
|
||||
/// <param name="currRecord"></param>
|
||||
public bool WipKitUpsert(WipSetupKitModel currRecord)
|
||||
public async Task<bool> WipKitUpsertAsync(WipSetupKitModel currRecord)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("WipKitUpsert");
|
||||
using var activity = ActivitySource.StartActivity("WipKitUpsertAsync");
|
||||
string source = "DB";
|
||||
bool fatto = false;
|
||||
// salvo
|
||||
fatto = dbController.WipKitUpsert(currRecord);
|
||||
fatto = await dbController.WipKitUpsertAsync(currRecord);
|
||||
// svuoto cache KitWip
|
||||
EmptyWipCache();
|
||||
await FlushCacheByTagAsync(Utils.redisKitWip);
|
||||
#if false
|
||||
EmptyWipCache();
|
||||
#endif
|
||||
activity?.SetTag("data.source", source);
|
||||
activity?.Stop();
|
||||
LogTrace($"WipKitUpsert | {source} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
LogTrace($"WipKitUpsertAsync | {source} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
return fatto;
|
||||
}
|
||||
|
||||
@@ -2472,6 +2481,7 @@ namespace MP.SPEC.Data
|
||||
|
||||
#region Private Methods
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Svuota cache creazione KIT
|
||||
/// </summary>
|
||||
@@ -2482,7 +2492,8 @@ namespace MP.SPEC.Data
|
||||
{
|
||||
ExecFlushRedisPattern(pattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Verifica caricamento dizionario ConfigData
|
||||
|
||||
Reference in New Issue
Block a user