Bläddra i källkod

rename method.

master
yangxiaodong 7 år sedan
förälder
incheckning
223430ced2
2 ändrade filer med 4 tillägg och 8 borttagningar
  1. +2
    -2
      src/DotNetCore.CAP/IQueueExecutor.Publish.Base.cs
  2. +2
    -6
      src/DotNetCore.CAP/IQueueExecutor.Subscibe.cs

+ 2
- 2
src/DotNetCore.CAP/IQueueExecutor.Publish.Base.cs Visa fil

@@ -40,7 +40,7 @@ namespace DotNetCore.CAP
var newState = default(IState);
if (!result.Succeeded)
{
var shouldRetry = await UpdateJobForRetryAsync(message, connection);
var shouldRetry = await UpdateMessageForRetryAsync(message, connection);
if (shouldRetry)
{
newState = new ScheduledState();
@@ -74,7 +74,7 @@ namespace DotNetCore.CAP
}
}

private async Task<bool> UpdateJobForRetryAsync(CapPublishedMessage message, IStorageConnection connection)
private async Task<bool> UpdateMessageForRetryAsync(CapPublishedMessage message, IStorageConnection connection)
{
var retryBehavior = RetryBehavior.DefaultRetry;



+ 2
- 6
src/DotNetCore.CAP/IQueueExecutor.Subscibe.cs Visa fil

@@ -14,23 +14,19 @@ namespace DotNetCore.CAP
public class SubscibeQueueExecutor : IQueueExecutor
{
private readonly IConsumerInvokerFactory _consumerInvokerFactory;
private readonly IConsumerClientFactory _consumerClientFactory;
private readonly IStateChanger _stateChanger;
private readonly ILogger _logger;

private readonly MethodMatcherCache _selector;
//private readonly CapOptions _options;

public SubscibeQueueExecutor(
IStateChanger stateChanger,
MethodMatcherCache selector,
IConsumerInvokerFactory consumerInvokerFactory,
IConsumerClientFactory consumerClientFactory,
ILogger<BasePublishQueueExecutor> logger)
{
_selector = selector;
_consumerInvokerFactory = consumerInvokerFactory;
_consumerClientFactory = consumerClientFactory;
_stateChanger = stateChanger;
_logger = logger;
}
@@ -53,7 +49,7 @@ namespace DotNetCore.CAP
var newState = default(IState);
if (!result.Succeeded)
{
var shouldRetry = await UpdateJobForRetryAsync(message, connection);
var shouldRetry = await UpdateMessageForRetryAsync(message, connection);
if (shouldRetry)
{
newState = new ScheduledState();
@@ -123,7 +119,7 @@ namespace DotNetCore.CAP
}
}

private async Task<bool> UpdateJobForRetryAsync(CapReceivedMessage message, IStorageConnection connection)
private async Task<bool> UpdateMessageForRetryAsync(CapReceivedMessage message, IStorageConnection connection)
{
var retryBehavior = RetryBehavior.DefaultRetry;



Laddar…
Avbryt
Spara