Pārlūkot izejas kodu

Fix inmemeory status update bug

master
Savorboard pirms 4 gadiem
vecāks
revīzija
1e75fcd26e
2 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. +3
    -1
      src/DotNetCore.CAP.InMemoryStorage/IDataStorage.InMemory.cs
  2. +1
    -2
      src/DotNetCore.CAP/Internal/IConsumerRegister.Default.cs

+ 3
- 1
src/DotNetCore.CAP.InMemoryStorage/IDataStorage.InMemory.cs Parādīt failu

@@ -32,12 +32,14 @@ namespace DotNetCore.CAP.InMemoryStorage
public Task ChangePublishStateAsync(MediumMessage message, StatusName state)
{
PublishedMessages[message.DbId].StatusName = state;
PublishedMessages[message.DbId].ExpiresAt = message.ExpiresAt;
return Task.CompletedTask;
}

public Task ChangeReceiveStateAsync(MediumMessage message, StatusName state)
{
ReceivedMessages[message.DbId].StatusName = state;
ReceivedMessages[message.DbId].ExpiresAt = message.ExpiresAt;
return Task.CompletedTask;
}

@@ -106,7 +108,7 @@ namespace DotNetCore.CAP.InMemoryStorage
Retries = mdMessage.Retries,
Added = mdMessage.Added,
ExpiresAt = mdMessage.ExpiresAt,
StatusName = StatusName.Failed
StatusName = StatusName.Scheduled
};
return mdMessage;
}


+ 1
- 2
src/DotNetCore.CAP/Internal/IConsumerRegister.Default.cs Parādīt failu

@@ -152,8 +152,7 @@ namespace DotNetCore.CAP.Internal
client.OnMessageReceived += async (sender, transportMessage) =>
{
_logger.MessageReceived(transportMessage.GetId(), transportMessage.GetName());

_cts.Token.ThrowIfCancellationRequested();
long? tracingTimestamp = null;
try
{


Notiek ielāde…
Atcelt
Saglabāt