public async Task Register() { if (!_registered) { await RabbitHttpClient.CreateVHostAndConfigs(_config.ConnConfig); await _consumerManager.Register(); _registered = true; } }
public void StartMonitor() { Helpers.Monitor.Run(() => RabbitHttpClient.CreateVHostAndConfigs(_config.ConnConfig), _config.ConnConfig.MonitoringInterval, _config.ConnConfig.MonitoringInterval, _cts.Token, ex => Task.Run(() => _logger?.LogError(ex, "[RabbitLight] Error while ensuring VHost and configs"))); }