예제 #1
0
        public ActionResult <SortJob> EnqueueJob(int[] values)
        {
            // TODO: Should enqueue a job to be processed in the background.
            var pendingJob = new SortJob(
                id: Guid.NewGuid(),
                status: SortJobStatus.Pending,
                duration: null,
                input: values,
                output: null);

            MemoryQueue.InsertToQueue(pendingJob);

            return(Ok(pendingJob));
        }