public static void GetCurrencyConverter() { client.BaseAddress = new Uri(AppSettingHelper.GetCurrencyConverterUrl()); client.Timeout = TimeSpan.FromSeconds(30); while (true) { _logger.Info("Get data from CurrencyConverter Api!!!"); RunAsync().GetAwaiter().GetResult(); Thread.Sleep(AppSettingHelper.GetCurrencyConverterInterval()); } }