|
@@ -335,14 +335,16 @@ namespace TEAMModelOS.Controllers.Core
|
|
|
}
|
|
|
long? useSize = blobSize + disSize;
|
|
|
await _azureRedis.GetRedisClient(8).HashSetAsync($"Blob:Record", name, useSize);
|
|
|
-
|
|
|
+ Dictionary<string, double?> catalog = new Dictionary<string, double?>();
|
|
|
foreach (var x in urls) {
|
|
|
- await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Blob:Catalog:{name}", System.Web.HttpUtility.UrlDecode(x.url, Encoding.UTF8).Split("/")[0], x.size);
|
|
|
+ string u = System.Web.HttpUtility.UrlDecode(x.url, Encoding.UTF8).Split("/")[0];
|
|
|
+ await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Blob:Catalog:{name}", u, x.size);
|
|
|
+ catalog[u]= await _azureRedis.GetRedisClient(8).SortedSetScoreAsync($"Blob:Catalog:{name}", u);
|
|
|
}
|
|
|
var messageBlob = new ServiceBusMessage(new {id=Guid.NewGuid().ToString(), progress = "update",name=name}.ToJsonString());
|
|
|
messageBlob.ApplicationProperties.Add("name", "Blob");
|
|
|
await _serviceBus.GetServiceBusClient().SendMessageAsync("active-task", messageBlob);
|
|
|
- return Ok(new { size=useSize });
|
|
|
+ return Ok(new { size=useSize, catalog });
|
|
|
}
|
|
|
|
|
|
private static (string, string) BlobUrlString(string sasUrl)
|