private void DoWork(object state) { foreach (var jobId in _cache.Keys) { var job = _cache.GetEntry(jobId); if (job != null && job.Status == SortJobStatus.Pending) { var resultJob = _sortService.Process(job).Result; _cache.SetEntry(jobId, resultJob); } } }
public SortJob?GetJob(Guid jobId) { var job = _cache.GetEntry(jobId.ToString()); return(job); }