Remove rescheduling for now

This commit is contained in:
Sipke Schoorstra 2021-02-09 18:46:50 +01:00
parent 446e645577
commit 3e12cd59ce

View file

@ -9,6 +9,7 @@ using Elsa.Services;
using Microsoft.Extensions.Logging;
using NodaTime;
using Rebus.Handlers;
using Rebus.Pipeline;
namespace Elsa.Consumers
{
@ -45,9 +46,9 @@ namespace Elsa.Consumers
if (!await _distributedLockProvider.AcquireLockAsync(lockKey))
{
// Reschedule message.
_logger.LogDebug("Failed to acquire lock on workflow instance {WorkflowInstanceId}. Rescheduling message", workflowInstanceId);
await _commandSender.DeferAsync(message, Duration.FromSeconds(5));
// TODO: Reschedule message if it's not a redelivery.
// var currentContext = MessageContext.Current;
_logger.LogDebug("Failed to acquire lock on workflow instance {WorkflowInstanceId}", workflowInstanceId);
return;
}