CrazyIter_Bin 4 роки тому
батько
коміт
d84064a307

+ 2 - 0
TEAMModelFunction/MonitorServicesBus.cs

@@ -146,6 +146,8 @@ namespace TEAMModelFunction
         }
         [FunctionName("Blob")]
         public async Task Blob([ServiceBusTrigger("active-task", "blob", Connection = "Azure:ServiceBus:ConnectionString")] string msg) {
+            await _dingDing.SendBotMsg($"ServiceBus,Blob() 容器:{msg}更新大小:",
+                                    GroupNames.醍摩豆服務運維群組);
             var jsonMsg = JsonDocument.Parse(msg);
             jsonMsg.RootElement.TryGetProperty("code", out JsonElement name);
             var client = _azureStorage.GetBlobContainerClient($"{name}");

+ 1 - 1
TEAMModelOS/Controllers/Core/BlobController.cs

@@ -293,7 +293,7 @@ namespace TEAMModelOS.Controllers.Core
             await _azureRedis.GetRedisClient(8).HashSetAsync($"Blob:Record", name, useSize);
             var messageBlob = new ServiceBusMessage(new {id=Guid.NewGuid().ToString(), progress = "update",code=name}.ToJsonString());
             messageBlob.ApplicationProperties.Add("name", "Blob");
-            await _serviceBus.GetServiceBusClient().SendMessageAsync("active-task", messageBlob);
+            await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync("active-task", messageBlob, DateTimeOffset.UtcNow.AddSeconds(5));
             return Ok(new { size=useSize });
         }