Exemplo n.º 1
0
        public async Task <ActionResult <SortJob> > EnqueueJob(int[] values)
        {
            var pendingJob = new SortJob(
                id: Guid.NewGuid(),
                status: SortJobStatus.Pending,
                duration: null,
                input: values,
                output: null);
            var response = await Task.Run(() => _sortJobProcessor.PushQueue(pendingJob));

            return(Ok(response));
        }