コード例 #1
0
ファイル: GroupFetcher.cs プロジェクト: relman/ServiceControl
        private void MakeSureForwardingBatchIsIncludedAsOpen(string classifier, RetryBatch forwardingBatch, List <RetryGroup> open)
        {
            if (forwardingBatch == null || forwardingBatch.Classifier != classifier)
            {
                return;
            }

            if (IsCurrentForwardingOperationIncluded(open, forwardingBatch))
            {
                return;
            }

            var fg = MapOpenForForwardingOperation(classifier, forwardingBatch, retryOperationManager.GetStatusForRetryOperation(forwardingBatch.RequestId, RetryType.FailureGroup));

            open.Add(fg);
        }
コード例 #2
0
ファイル: GroupFetcher.cs プロジェクト: relman/ServiceControl
        private static RetryGroup MapOpenForForwardingOperation(string classifier, RetryBatch forwardingBatch, RetryOperation summary)
        {
            var progress = summary.GetProgress();

            return(new RetryGroup
            {
                Id = forwardingBatch.RequestId,
                Title = forwardingBatch.Originator,
                Type = classifier,
                Count = 0,
                Last = summary.Last,
                RetryStatus = summary.RetryState.ToString(),
                RetryFailed = summary.Failed,
                RetryProgress = progress.Percentage,
                RetryRemainingCount = progress.MessagesRemaining,
                RetryCompletionTime = summary.CompletionTime,
                RetryStartTime = summary.Started,
                NeedUserAcknowledgement = false
            });
        }
コード例 #3
0
ファイル: GroupFetcher.cs プロジェクト: relman/ServiceControl
 private static bool IsCurrentForwardingOperationIncluded(List <RetryGroup> open, RetryBatch forwardingBatch)
 {
     return(open.Any(x => x.Id == forwardingBatch.RequestId && x.Type == forwardingBatch.Classifier && forwardingBatch.RetryType == RetryType.FailureGroup));
 }