public AdoptOrphanBatchesFromPreviousSession(RetryDocumentManager retryDocumentManager, TimeKeeper timeKeeper, IDocumentStore store) { this.retryDocumentManager = retryDocumentManager; this.timeKeeper = timeKeeper; this.store = store; startTime = DateTime.UtcNow; }
private async Task StageRetryByUniqueMessageIds(string requestId, RetryType retryType, string[] messageIds, DateTime startTime, DateTime?last = null, string originator = null, string batchName = null, string classifier = null) { if (messageIds == null || !messageIds.Any()) { log.Info($"Batch '{batchName}' contains no messages"); return; } var failedMessageRetryIds = messageIds.Select(FailedMessageRetry.MakeDocumentId).ToArray(); var batchDocumentId = await retryDocumentManager.CreateBatchDocument(requestId, retryType, failedMessageRetryIds, originator, startTime, last, batchName, classifier) .ConfigureAwait(false); log.Info($"Created Batch '{batchDocumentId}' with {messageIds.Length} messages for '{batchName}'."); var commands = new ICommandData[messageIds.Length]; for (var i = 0; i < messageIds.Length; i++) { commands[i] = RetryDocumentManager.CreateFailedMessageRetryDocument(batchDocumentId, messageIds[i]); } await store.AsyncDatabaseCommands.BatchAsync(commands) .ConfigureAwait(false); await retryDocumentManager.MoveBatchToStaging(batchDocumentId).ConfigureAwait(false); log.Info($"Moved Batch '{batchDocumentId}' to Staging"); }
public RetriesGateway(IDocumentStore store, RetryDocumentManager documentManager) { this.store = store; retryDocumentManager = documentManager; }
public RebuildRetryGroupStatuses(RetryDocumentManager retryDocumentManager, IDocumentStore store) { this.store = store; this.retryDocumentManager = retryDocumentManager; }
public PendingRetriesHandler(IDocumentStore store, RetryDocumentManager manager) { this.store = store; this.manager = manager; }