private void SetupPlaylist(Playlist playlist, Grpc.Playlist.PlaylistClient client)
        {
            try
            {
                var ids = new List <int> {
                    1, 2, 3
                };
                Parallel.ForEach(ids, async id =>
                {
                    _logger.LogInformation($"Fetching schedule#{id}");
                    var schedule = await FetchSchedule(id);
                    playlist.AddChannel(id, schedule.AsEntity());
                });
                _logger.LogInformation("Fetched all schedules");
                playlist.TrackChanged += async(sender, change) =>
                {
                    var key = $"CurrentTrack-{change.ChannelId}";
                    _logger.LogInformation(
                        $"{change.ChannelId} started playing #{change.Track.Id} => {change.Track.StartHour} - {change.Track.StopHour} {change.Track.Title} / {change.Track.Description}");
                    await _cache.SetStringAsync(key, JsonConvert.SerializeObject(change.Track));

                    _logger.LogInformation($"Settings cache entry {key}");
                    // await client.NotifyAsync(new CurrentTrackRequest
                    // {
                    //     ChannelId = change.ChannelId
                    // });
                };
            }
            catch (Exception e)
            {
                _logger.LogError($"{e.StackTrace}");
            }
        }
        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
            var channel   = GrpcChannel.ForAddress(_connectionString);
            var client    = new Grpc.Playlist.PlaylistClient(channel);
            var playlist  = new Playlist();
            var fetchDate = DateTime.UtcNow.AddHours(2); //init date

            // SetupPlaylist(playlist, client);
            while (!stoppingToken.IsCancellationRequested)
            {
                var currentTime = DateTime.UtcNow.AddHours(2); //time in pl
                if (currentTime.Date != fetchDate.Date)
                {
                    _logger.LogInformation($"Day has changed, reloading schedule");
                    //Day has changed, fetch new schedule etc.
                    SetupPlaylist(playlist, client);
                }

                _logger.LogInformation("Waiting...");
                //tracks are changed not more often than every minute
                await Task.Delay(1000, stoppingToken);

                // await Task.Delay(TimeSpan.FromMinutes(1), stoppingToken);
            }
        }