review
This commit is contained in:
parent
19548b3fc2
commit
4473936577
@ -144,6 +144,8 @@ public class TrackUpsertEventHandler : ITransientDependency, ICapSubscribe
|
||||
return false;
|
||||
}
|
||||
|
||||
// todo: 在这里,判断存在性
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -55,6 +55,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
||||
[HttpPost("Track/Upsert")]
|
||||
public async Task<UnifyResultDto> UpsertTrackAsync(UpsertTrackInput input)
|
||||
{
|
||||
// todo: 代码太长了
|
||||
var order = await _orderRepository.GetFirstAsync(x =>
|
||||
x.SubSystemId == input.SubSystemId && x.OrderType == input.OrderType && x.OrderNo == input.OrderNo,
|
||||
x => new
|
||||
@ -119,6 +120,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
||||
.Where(x => x.TrackTime == input.TrackTime)
|
||||
.ToList();
|
||||
|
||||
// todo:es落盘延迟是不确定的
|
||||
//当为更新操作时发现更新的数目为0进行重试操作
|
||||
if (!input.IsAdd && tracks.Count == 0)
|
||||
{
|
||||
@ -133,6 +135,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
||||
.ToList();
|
||||
if (tracks.Count > 0)
|
||||
success = true;
|
||||
// todo: 最大重试次数应该是可配置的,当出现的时候应该有告警,而不是直接给调用方,指数退避 2^N
|
||||
await Task.Delay(300);
|
||||
}
|
||||
finally
|
||||
|
||||
Loading…
Reference in New Issue
Block a user