Exemple #1
0
 public void AfterExecuteBatch(RedisPipeBatch batch)
 {
     if (batch.HoldingList != null)
     {
         var db = _redis.GetDatabase();
         db.HashDelete(RedisTaskMultiplexorConstants.BatchesSetKey, batch.HoldingList);
         db.KeyDelete(batch.HoldingList);
     }
 }
        private void ExecuteBatch(ITaskExecutor taskExecutor, PipeInfo pipeInfo, RedisPipeBatch messageBatch)
        {
            foreach (var redisMessage in messageBatch.RedisPipeValues)
            {
                try
                {
                    taskExecutor.Execute(pipeInfo, redisMessage);
                    _taskFunnel.AfterExecute(redisMessage, true);
                }
                catch (Exception e)
                {
                    _logger.LogError(e,
                                     $"Error handling from {pipeInfo.ParentPipeName}/{pipeInfo.ChildPipeName}");
                    //this will resubmit the message
                    _taskFunnel.AfterExecute(redisMessage, false);
                }
            }

            _taskFunnel.AfterExecuteBatch(messageBatch);
        }
Exemple #3
0
 public bool RetainHoldingList(RedisPipeBatch value, TimeSpan lockExpiry)
 {
     return(RetainHoldingList(value.HoldingList, lockExpiry));
 }