public IList <QueueWithTopEnqueuedJobsDto> Queues()
        {
            var queuesData = Data.GetEnumeration <JobQueueDto>().ToList();
            var queues     = queuesData.GroupBy(q => q.Queue).ToDictionary(q => q.Key, q => q.Count());

            var query =
                from kvp in queues
                let enqueuedJobIds = QueueApi.GetEnqueuedJobIds(kvp.Key, 0, 5, false)
                                     let counters = QueueApi.GetEnqueuedAndFetchedCount(queuesData, kvp.Key)
                                                    select new QueueWithTopEnqueuedJobsDto
            {
                Name      = kvp.Key,
                Length    = counters.EnqueuedCount,
                Fetched   = counters.FetchedCount,
                FirstJobs = EnqueuedJobs(enqueuedJobIds)
            };

            return(query.ToList());
        }
        public JobList <FetchedJobDto> FetchedJobs(string queue, int from, int perPage)
        {
            var fetchedJobIds = QueueApi.GetEnqueuedJobIds(queue, from, perPage, true);

            return(FetchedJobs(fetchedJobIds));
        }
        public JobList <EnqueuedJobDto> EnqueuedJobs(string queue, int from, int perPage)
        {
            var enqueuedJobIds = QueueApi.GetEnqueuedJobIds(queue, from, perPage, false);

            return(EnqueuedJobs(enqueuedJobIds));
        }