diff --git a/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs b/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs index 55d0ed5e..ceed798d 100644 --- a/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs +++ b/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs @@ -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 {