瀏覽代碼

add failed message processor.

master
Savorboard 7 年之前
父節點
當前提交
8e41e0d552
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. +3
    -6
      src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs

+ 3
- 6
src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs 查看文件

@@ -47,7 +47,7 @@ namespace DotNetCore.CAP.Processor
_context = new ProcessingContext(_provider, _cts.Token);

var processorTasks = _processors
.Select(p => InfiniteRetry(p))
.Select(InfiniteRetry)
.Select(p => p.ProcessAsync(_context));
_compositeTask = Task.WhenAll(processorTasks);
}
@@ -84,10 +84,7 @@ namespace DotNetCore.CAP.Processor

private bool AllProcessorsWaiting()
{
foreach (var processor in _messageDispatchers)
if (!processor.Waiting)
return false;
return true;
return _messageDispatchers.All(processor => processor.Waiting);
}

private IProcessor InfiniteRetry(IProcessor inner)
@@ -107,7 +104,7 @@ namespace DotNetCore.CAP.Processor

returnedProcessors.Add(_provider.GetRequiredService<PublishQueuer>());
returnedProcessors.Add(_provider.GetRequiredService<SubscribeQueuer>());
//returnedProcessors.Add(_provider.GetRequiredService<FailedJobProcessor>());
returnedProcessors.Add(_provider.GetRequiredService<FailedProcessor>());

returnedProcessors.Add(_provider.GetRequiredService<IAdditionalProcessor>());



Loading…
取消
儲存