Explorar el Código

Fix inmemeory status update bug

master
Savorboard hace 4 años
padre
commit
1e75fcd26e
Se han modificado 2 ficheros con 4 adiciones y 3 borrados
  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 Ver fichero

@@ -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 Ver fichero

@@ -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
{


Cargando…
Cancelar
Guardar