public void Run()
        {
            Thread.CurrentThread.Name = "CommonNotificationThread";

            var checkMainStatsEvery = new CheckEvery(10);
            var checkHeartBeatEvery = new CheckEvery(10);

            this.IsRunning = true;

            while (this.IsRunning)
            {
                try
                {
                    if (checkMainStatsEvery.IsTimeToCheck)
                    {
                        checkMainStatsEvery.UpdateChecked();
                        HomeDashboardHub.SendStats(this._homeHubContext);
                    }

                    if (checkHeartBeatEvery.IsTimeToCheck)
                    {
                        checkHeartBeatEvery.UpdateChecked();
                        HeartBeatHub.Beat(_heartbeatHubContext);
                    }

                    Thread.Sleep(300);
                }
                catch (Exception)
                {
                    // ignore exceptions and just carry on
                    Thread.Sleep(3000);
                }
            }
        }
Esempio n. 2
0
 public Reporter(HeartBeatHub hub) : base(hub)
 {
 }
Esempio n. 3
0
 public CommonBase_a(HeartBeatHub hub)
 {
     Hub = hub;
 }
Esempio n. 4
0
 public WatcherStatus(HeartBeatHub hub) : base(hub)
 {
 }
Esempio n. 5
0
 public AssemToucher(HeartBeatHub hub) : base(hub)
 {
 }
 public AssemblyInfoFileHandler(HeartBeatHub hub) : base(hub)
 {
 }
Esempio n. 7
0
 public SettingsFile(HeartBeatHub hub) : base(hub)
 {
 }
 public OneTargetedDirectoryOfTypeMonitor(List <string> excludedFiles, HeartBeatHub hub) : base(hub)
 {
     excludedFiles.ForEach(x => excludedFilesLc.Add(x.ToLower()));
     //this.excludedFilesLc = excludedFiles;
 }
Esempio n. 9
0
 public Watcher(AssemToucher toucher, HeartBeatHub hub) : base(hub)
 {
     Toucher = toucher;
 }