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)); }
private void ProcessJob(SortJob objJob) { _completedJobs.Add(_sortJobProcessor.Process(objJob).Result); }