コード例 #1
0
        protected override async Task WarmUp()
        {
            var database = _databaseFunc();

            _retry.Do(() => database.SetAdd(_subscription.TopicSubscribersRedisKey, _subscription.SubscriptionMessagesRedisKey));
            await base.WarmUp();
        }
コード例 #2
0
ファイル: AzureQueueManager.cs プロジェクト: ybdev/Nimbus
        public Task <TopicClient> CreateTopicSender(string topicPath)
        {
            return(Task.Run(() =>
            {
                EnsureTopicExists(topicPath);

                return _retry.Do(() =>
                {
                    var topicClient = _messagingFactory().CreateTopicClient(topicPath);
                    return topicClient;
                },
                                 "Creating topic sender for " + topicPath);
            }).ConfigureAwaitFalse());
        }
コード例 #3
0
ファイル: AzureQueueManager.cs プロジェクト: DamianMac/Nimbus
        public Task <ITopicClient> CreateTopicSender(string topicPath)
        {
            return(Task.Run(() =>
            {
                EnsureTopicExists(topicPath);

                return _retry.Do(() =>
                {
                    var topicClient = _connectionManager.CreateTopicClient(topicPath);

                    return topicClient;
                },
                                 "Creating topic sender for " + topicPath);
            }).ConfigureAwaitFalse());
        }
コード例 #4
0
 /// <summary>
 /// Method Name     : TrySendMail
 /// Author          : Ranjana Singh
 /// Creation Date   : 04 Jan 2018
 /// Purpose         : Send mail
 /// Revision        :
 /// </summary>
 /// <param name="numberOfTimeToTry"></param>
 /// <returns></returns>
 public bool TrySendMail(int numberOfTimeToTry = 1)
 {
     return(retry.Do(() => smtpClientFactory.Send(emailMessage), TimeSpan.FromSeconds(5), numberOfTimeToTry));
 }