Merge remote-tracking branch 'origin/S03-轨迹中台优化项' into test

This commit is contained in:
dingenwen 2024-04-23 09:07:40 +08:00
commit 1ff9ba3bdb

View File

@ -105,22 +105,20 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
throw new ArgumentOutOfRangeException();
}
// 往es 写推送日志
await _trackPushRecordsRepository.AddAsync(log);
if (!log.IsSuccess)
{
// 重试过程中不会去更新订单主表
if (@event.RetryNum < 3)
{
@event.RetryNum++;
// 1, 2, 4min
await _capPublisher.PublishDelayAsync(
TimeSpan.FromSeconds((1 << @event.RetryNum - 1) * RandomHelper.GetRandom(30, 60)),
GlobalConst.TrackPushSubscribe, @event);
await _capPublisher.PublishAsync(GlobalConst.TrackPushSubscribe, @event);
return;
}
}
// 往es 写推送日志
await _trackPushRecordsRepository.AddAsync(log);
// 同步去更新订单主表
await TrackPushAfterUpdateOrderAsync(new TrackPushAfterUpdateOrderDto
{