Exemple #1
0
 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);
         }
     }
 }
Exemple #2
0
        public SortJob?GetJob(Guid jobId)
        {
            var job = _cache.GetEntry(jobId.ToString());

            return(job);
        }