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

            _sortJobProcessor.Enqueue(pendingJob);

            return(Ok(pendingJob));
        }
Exemplo n.º 2
0
        public ActionResult <SortJob> EnqueueJob(int[] values)
        {
            // TODO: Should enqueue a job to be processed in the background.
            SortJob pendingJob = new SortJob(
                id: Guid.NewGuid(),
                status: SortJobStatus.Pending,
                duration: null,
                input: values,
                output: null);

            _sortJobProcessor.Enqueue(pendingJob);

            return(Ok(pendingJob));

            //throw new NotImplementedException();
        }