コード例 #1
0
        public void Initialize(DocumentDatabase database = null)
        {
            _postponedNotificationSender = new PostponedNotificationsSender(_database, _notificationsStorage, Watchers, _shutdown);
            BackgroundWorkers.Add(_postponedNotificationSender);

            if (database != null)
            {
                BackgroundWorkers.Add(new DatabaseStatsSender(database, this));
            }

            IsInitialized = true;
        }
コード例 #2
0
        public ServerDashboardNotifications(ServerStore serverStore, CancellationToken shutdown)
        {
            var options = new ServerDashboardOptions();

            var machineResourcesNotificationSender =
                new MachineResourcesNotificationSender(nameof(ServerStore), serverStore.Server, Watchers, options.MachineResourcesThrottle, shutdown);

            BackgroundWorkers.Add(machineResourcesNotificationSender);

            var databasesInfoNotificationSender =
                new DatabasesInfoNotificationSender(nameof(ServerStore), serverStore, Watchers, options.DatabasesInfoThrottle, shutdown);

            BackgroundWorkers.Add(databasesInfoNotificationSender);
        }