|
|
|
@ -41,7 +41,9 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
{
|
|
|
|
|
"thing/product/+/services_reply",
|
|
|
|
|
"thing/product/+/events",
|
|
|
|
|
"thing/product/+/requests"
|
|
|
|
|
"thing/product/+/requests",
|
|
|
|
|
"thing/product/+/osd",
|
|
|
|
|
"thing/product/+/status"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
await _mqttClientManager
|
|
|
|
@ -121,8 +123,7 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
output = new
|
|
|
|
|
{
|
|
|
|
|
bucket = _minioService._bucketName,
|
|
|
|
|
// todo 这里待确定
|
|
|
|
|
endpoint = $"http://{_minioService.endPoint}",
|
|
|
|
|
endpoint = $"{_minioService.endPoint}",
|
|
|
|
|
object_key_prefix = Guid.NewGuid().ToString(), // todo 是否设计任务id ?
|
|
|
|
|
provider = "minio",
|
|
|
|
|
region = "linyi",
|
|
|
|
@ -240,6 +241,11 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
ExpectedFileCount = expectFileCount, // 期望文件数量
|
|
|
|
|
UploadedFileCount = uploadedFileCount // 已上传文件数量
|
|
|
|
|
};
|
|
|
|
|
// 当expectFileCount 等于uploadedFileCount时,则表示航线执行完成
|
|
|
|
|
if (uploadedFileCount.Equals(expectFileCount))
|
|
|
|
|
{
|
|
|
|
|
taskRecord.Status = 5; // 成功状态
|
|
|
|
|
}
|
|
|
|
|
await _sqlSugarClient.Updateable(taskRecord)
|
|
|
|
|
.IgnoreNullColumns().ExecuteCommandAsync();
|
|
|
|
|
break;
|
|
|
|
@ -303,7 +309,7 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
switch (method)
|
|
|
|
|
{
|
|
|
|
|
case "flighttask_prepare": // 下发任务响应
|
|
|
|
|
// todo 同一prepare消息只能处理一次
|
|
|
|
|
// 顺序处理,多余的不再处理
|
|
|
|
|
lock (_locker)
|
|
|
|
|
{
|
|
|
|
|
// 报错处理
|
|
|
|
@ -396,7 +402,9 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
await _sqlSugarClient.Updateable(taskRecordExecute).IgnoreNullColumns().ExecuteCommandAsync();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case "thing/product/*/osd":
|
|
|
|
|
Console.WriteLine($"osd消息: {message}");
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
Console.WriteLine($"未进入主题处理");
|
|
|
|
|