Ejemplo n.º 1
0
        protected override async Task ExecuteAsync(CancellationToken cancellationToken)
        {
            while (!cancellationToken.IsCancellationRequested)
            {
                // this task was supposed to run on the background but the db operations are disabled
                await UpdateTask.UpdateSearches();

                await Task.Delay(TimeSpan.FromHours(2), cancellationToken);
            }
        }
Ejemplo n.º 2
0
 public UpdateSearchesService(UpdateTask updateTask)
 {
     _updateTask = updateTask;
 }