private async Task ExecuteAsync(CancellationToken stoppingToken) { while (!stoppingToken.IsCancellationRequested) { logger.LogDebug("ProviderManager worker running at: {time}", DateTimeOffset.Now); try { // Renewing translations metas providerManagerFlow.Post( new MessageContext <RequestFixtureChanges>( new RequestFixtureChanges() { AfterDateTime = providerManagerState.LastTranslationList } ) );; //subscriptionDetails = translations.ToDictionary(key => key.Id, value => new TranslationSubscription() { BookedData = value.BookedData.Value == true, BookedMarket = value.BookedMarket }); } catch (Exception ex) { logger.LogError(ex, "Sending TranslationsRequest error."); } await Task.Delay(options.MetaRefreshInterval, stoppingToken); } }
private async Task ExecuteAsync(CancellationToken stoppingToken) { while (!stoppingToken.IsCancellationRequested) { logger.LogDebug("ProviderManager worker running at: {time}", DateTimeOffset.Now); try { // Renewing translations metas providerManagerFlow.Post( new MessageContext <TranslationsRequest>( new TranslationsRequest() { //Booking = "booked", //FromISO8601 = DateTimeOffset.UtcNow.AddHours(-3), SportId = 6 // Tennis } ) ); //subscriptionDetails = translations.ToDictionary(key => key.Id, value => new TranslationSubscription() { BookedData = value.BookedData.Value == true, BookedMarket = value.BookedMarket }); } catch (Exception ex) { logger.LogError(ex, "Sending TranslationsRequest error."); } await Task.Delay(options.MetaRefreshInterval, stoppingToken); } }