private void HandleConsoleMessage(ElasticsearchMessage s, ManualResetEvent handle) { //no need to snoop for metadata if we already started if (!this.RunningIntegrations || this.Started) { return; } ElasticsearchNodeInfo info; int port; if (s.TryParseNodeInfo(out info)) { this.Info = info; } else if (s.TryGetStartedConfirmation()) { var healthyCluster = this.Client().ClusterHealth(g => g.WaitForStatus(WaitForStatus.Yellow).Timeout(TimeSpan.FromSeconds(30))); if (healthyCluster.IsValid) { this._blockingSubject.OnNext(handle); this.Started = true; } else { this._blockingSubject.OnError(new Exception("Did not see a healthy cluster after the node started for 30 seconds")); handle.Set(); this.Stop(); } } else if (s.TryGetPortNumber(out port)) { this.Port = port; } }
private void HandleConsoleMessage(ElasticsearchMessage s, ManualResetEvent handle) { //no need to snoop for metadata if we already started if (!this.RunningIntegrations || this.Started) { return; } ElasticsearchNodeInfo info; int port; if (s.TryParseNodeInfo(out info)) { this.Info = info; } else if (s.TryGetStartedConfirmation()) { this._blockingSubject.OnNext(handle); this.Started = true; } else if (s.TryGetPortNumber(out port)) { this.Port = port; } }
private void HandleConsoleMessage(ElasticsearchMessage s, ManualResetEvent handle) { //no need to snoop for metadata if we already started if (!this.RunningIntegrations || this.Started) return; ElasticsearchNodeInfo info; int port; if (s.TryParseNodeInfo(out info)) { this.Info = info; } else if (s.TryGetStartedConfirmation()) { this._blockingSubject.OnNext(handle); this.Started = true; } else if (s.TryGetPortNumber(out port)) { this.Port = port; } }
private void HandleConsoleMessage(ElasticsearchMessage s, ManualResetEvent handle) { //no need to snoop for metadata if we already started if (!this.RunningIntegrations || this.Started) return; ElasticsearchNodeInfo info; int port; if (s.TryParseNodeInfo(out info)) { this.Info = info; } else if (s.TryGetStartedConfirmation()) { var healthyCluster = this.Client().ClusterHealth(g => g.WaitForStatus(WaitForStatus.Yellow).Timeout(TimeSpan.FromSeconds(30))); if (healthyCluster.IsValid) { this._blockingSubject.OnNext(handle); this.Started = true; } else { this._blockingSubject.OnError(new Exception("Did not see a healthy cluster after the node started for 30 seconds")); handle.Set(); this.Stop(); } } else if (s.TryGetPortNumber(out port)) { this.Port = port; } }