|
@@ -175,6 +175,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
|
|
[Function("Study")]
|
|
[Function("Study")]
|
|
public async Task StudyFunc([ServiceBusTrigger("%Azure:ServiceBus:ActiveTask%", "study", Connection = "Azure:ServiceBus:ConnectionString")] string msg)
|
|
public async Task StudyFunc([ServiceBusTrigger("%Azure:ServiceBus:ActiveTask%", "study", Connection = "Azure:ServiceBus:ConnectionString")] string msg)
|
|
{
|
|
{
|
|
|
|
+ string activityId = string.Empty;
|
|
try
|
|
try
|
|
{
|
|
{
|
|
var jsonMsg = JsonDocument.Parse(msg);
|
|
var jsonMsg = JsonDocument.Parse(msg);
|
|
@@ -184,11 +185,12 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
Study study = await client.GetContainer(Constant.TEAMModelOS, "Common").ReadItemAsync<Study>(id.ToString(), new PartitionKey($"{code}"));
|
|
Study study = await client.GetContainer(Constant.TEAMModelOS, "Common").ReadItemAsync<Study>(id.ToString(), new PartitionKey($"{code}"));
|
|
study.progress = progress.ToString();
|
|
study.progress = progress.ToString();
|
|
|
|
+ activityId = id.ToString();
|
|
await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync(study, id.ToString(), new PartitionKey($"{code}"));
|
|
await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync(study, id.ToString(), new PartitionKey($"{code}"));
|
|
}
|
|
}
|
|
catch (CosmosException e)
|
|
catch (CosmosException e)
|
|
{
|
|
{
|
|
- await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Study()-CosmosDB异常{e.Message}\n{e.Status}", GroupNames.成都开发測試群組);
|
|
|
|
|
|
+ await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Study()-CosmosDB异常{e.Message}\n{e.Status}\n{e.StackTrace}\n{activityId}", GroupNames.成都开发測試群組);
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|