예제 #1
0
        public async Task <ActionResult <SortJob> > EnqueueAndRunJob(int[] values)
        {
            var pendingJob = new SortJob(
                id: Guid.NewGuid(),
                status: SortStatusJob.Pending,
                duration: null,
                input: values,
                output: null);

            var completedJob = await _sortJobProcessor.Process(pendingJob);

            return(Ok(completedJob));
        }
예제 #2
0
 private void ProcessJob(SortJob objJob)
 {
     _completedJobs.Add(_sortJobProcessor.Process(objJob).Result);
 }