예제 #1
0
 public void AddConnected()
 {
     _lock.Wait();
     try
     {
         _numConnected++;
         if (!DashboardScrape.IsTaskActive)
         {
             _cancellationTokenSource = new CancellationTokenSource();
             DashboardScrape.StartDashboardScrapeTask(_settings.Url, _settings.DashboardRefreshTime, _cancellationTokenSource.Token);
         }
     }
     finally
     {
         _lock.Release();
     }
 }
예제 #2
0
 public override Task OnConnectedAsync()
 {
     DashboardScrape.StartDashboardScrapeTask(_settings.Url, _settings.DashboardRefreshTime, Context.ConnectionId, DataGatheredEvent, ScrapeSavedEvent);
     return(base.OnConnectedAsync());
 }