示例#1
0
        private static async Task <ServiceTaskDispatcherInfo> OpenSvcHostWithRetryAsync(
            string sessionId,
            ServiceTaskDispatcherInfo taskDispatcherInfo,
            string regPath,
            string svcName,
            Version svcVersion,
            Dictionary <string, string> environment,
            Dictionary <string, string> dependFilesInfo)
        {
            BrokerTracing.TraceVerbose("[OpenSvcHostWithRetryAsync] Started open service host {0} for session {1}", taskDispatcherInfo.MachineName, sessionId);
            RetryManager mgr = new RetryManager(new ExponentialRandomBackoffRetryTimer(1 * 1000, 10 * 1000), RetryManager.InfiniteRetries);

            return(await mgr.InvokeWithRetryAsync(() => OpenSvcHostAsync(sessionId, taskDispatcherInfo, regPath, svcName, svcVersion, environment, dependFilesInfo), ex => true));
        }
示例#2
0
        private static async Task <TaskInfo> OpenSvcHostWithRetryAsync(
            string sessionId,
            int num,
            string ipAddress,
            string regPath,
            string svcName,
            Version svcVersion,
            Dictionary <string, string> environment,
            Dictionary <string, string> dependFilesInfo)
        {
            BrokerTracing.TraceVerbose("[OpenSvcHostWithRetryAsync] Started open service host {0} for session {1}", ipAddress, sessionId);
            RetryManager mgr = new RetryManager(new ExponentialRandomBackoffRetryTimer(1 * 1000, 10 * 1000));

            return(await mgr.InvokeWithRetryAsync(() => OpenSvcHostAsync(sessionId, num, ipAddress, regPath, svcName, svcVersion, environment, dependFilesInfo), ex => true));
        }