|
@@ -266,7 +266,11 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
var client = _azureStorage.GetBlobContainerClient(name);
|
|
|
var size = await client.GetBlobsCatalogSize();
|
|
|
- await _azureRedis.GetRedisClient(8).HashSetAsync($"Blob:Record", name, size.Item1);
|
|
|
+ if (size.Item1 > 0)
|
|
|
+ {
|
|
|
+ await _azureRedis.GetRedisClient(8).HashSetAsync($"Blob:Record", name, size.Item1);
|
|
|
+ }
|
|
|
+
|
|
|
foreach (var key in size.Item2.Keys)
|
|
|
{
|
|
|
await _azureRedis.GetRedisClient(8).SortedSetRemoveAsync($"Blob:Catalog:{name}", key);
|
|
@@ -289,7 +293,10 @@ namespace TEAMModelOS.Controllers
|
|
|
else {
|
|
|
var client = _azureStorage.GetBlobContainerClient(name);
|
|
|
var size = await client.GetBlobsCatalogSize();
|
|
|
- await _azureRedis.GetRedisClient(8).HashSetAsync($"Blob:Record", name, size.Item1);
|
|
|
+ if (size.Item1 > 0)
|
|
|
+ {
|
|
|
+ await _azureRedis.GetRedisClient(8).HashSetAsync($"Blob:Record", name, size.Item1);
|
|
|
+ }
|
|
|
foreach (var key in size.Item2.Keys)
|
|
|
{
|
|
|
await _azureRedis.GetRedisClient(8).SortedSetRemoveAsync($"Blob:Catalog:{name}", key);
|