Пример #1
0
        public static void GetUpdatedMRSRequestInfo(RequestStatisticsBase requestJob, bool diagnostic, string diagnosticArgument)
        {
            MoveRequestInfo requestInfo = null;

            CommonUtils.CatchKnownExceptions(delegate
            {
                string mrsServer = MailboxReplicationServiceClient.GetMrsServer(requestJob.WorkItemQueueMdb.ObjectGuid);
                using (MailboxReplicationServiceClient mailboxReplicationServiceClient = MailboxReplicationServiceClient.Create(mrsServer))
                {
                    requestInfo = mailboxReplicationServiceClient.GetMoveRequestInfo(requestJob.IdentifyingGuid);
                    requestJob.UpdateThroughputFromMoveRequestInfo(requestInfo);
                    if (RequestTaskHelper.NeedToUpdateJobPickupMessage())
                    {
                        requestJob.UpdateMessageFromMoveRequestInfo(requestInfo);
                    }
                    if (diagnostic)
                    {
                        string jobPickupFailureMessage = (requestInfo == null) ? string.Empty : requestInfo.Message.ToString();
                        requestJob.PopulateDiagnosticInfo(new RequestStatisticsDiagnosticArgument(diagnosticArgument), jobPickupFailureMessage);
                    }
                }
            }, null);
        }