Exemplo n.º 1
0
 private void ProcessQueue()
 {
     foreach (var notification in _notificationFactory.GetAvailableProviders())
     {
         try
         {
             notification.ProcessQueue();
         }
         catch (Exception ex)
         {
             _logger.Warn(ex, "Unable to process notification queue for " + notification.Definition.Name);
         }
     }
 }
Exemplo n.º 2
0
        public override HealthCheck Check()
        {
            var discordSlackNotifications = _notificationFactory.GetAvailableProviders().Where(n => n.ConfigContract.Equals("SlackSettings") && (n.Definition.Settings as SlackSettings).WebHookUrl.Contains("discord"));

            if (discordSlackNotifications.Empty())
            {
                return(new HealthCheck(GetType()));
            }

            return(new HealthCheck(GetType(),
                                   HealthCheckResult.Warning,
                                   string.Format(_localizationService.GetLocalizedString("DiscordUrlInSlackNotification"),
                                                 string.Join(", ", discordSlackNotifications.Select(n => n.Name))),
                                   "#discord-as-slack-notification"));
        }