-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathJobStorageMonitor.cs
More file actions
72 lines (63 loc) · 3.18 KB
/
JobStorageMonitor.cs
File metadata and controls
72 lines (63 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// This file is part of Hangfire.
// Copyright © 2021 Hangfire OÜ.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using Hangfire.Storage.Monitoring;
namespace Hangfire.Storage
{
public abstract class JobStorageMonitor : IMonitoringApi
{
public abstract IList<QueueWithTopEnqueuedJobsDto> Queues();
public abstract IList<ServerDto> Servers();
public abstract JobDetailsDto JobDetails(string jobId);
public abstract StatisticsDto GetStatistics();
public abstract JobList<EnqueuedJobDto> EnqueuedJobs(string queue, int from, int perPage);
public abstract JobList<FetchedJobDto> FetchedJobs(string queue, int from, int perPage);
public abstract JobList<ProcessingJobDto> ProcessingJobs(int from, int count);
public abstract JobList<ScheduledJobDto> ScheduledJobs(int from, int count);
public abstract JobList<SucceededJobDto> SucceededJobs(int from, int count);
public abstract JobList<FailedJobDto> FailedJobs(int from, int count);
public abstract JobList<DeletedJobDto> DeletedJobs(int from, int count);
public virtual JobList<AwaitingJobDto> AwaitingJobs(int from, int count)
{
throw JobStorageFeatures.GetNotSupportedException(JobStorageFeatures.Monitoring.AwaitingJobs);
}
public abstract long JobCount(string stateName);
public abstract long ScheduledCount();
public abstract long EnqueuedCount(string queue);
public abstract long FetchedCount(string queue);
public abstract long FailedCount();
public abstract long ProcessingCount();
public abstract long SucceededListCount();
public abstract long DeletedListCount();
public virtual long AwaitingCount()
{
throw JobStorageFeatures.GetNotSupportedException(JobStorageFeatures.Monitoring.AwaitingJobs);
}
public abstract IDictionary<DateTime, long> SucceededByDatesCount();
public abstract IDictionary<DateTime, long> FailedByDatesCount();
public virtual IDictionary<DateTime, long> DeletedByDatesCount()
{
throw JobStorageFeatures.GetNotSupportedException(JobStorageFeatures.Monitoring.DeletedStateGraphs);
}
public abstract IDictionary<DateTime, long> HourlySucceededJobs();
public abstract IDictionary<DateTime, long> HourlyFailedJobs();
public virtual IDictionary<DateTime, long> HourlyDeletedJobs()
{
throw JobStorageFeatures.GetNotSupportedException(JobStorageFeatures.Monitoring.DeletedStateGraphs);
}
}
}