-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompositeC1StorageOptions.cs
More file actions
54 lines (44 loc) · 1.62 KB
/
Copy pathCompositeC1StorageOptions.cs
File metadata and controls
54 lines (44 loc) · 1.62 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
using System;
using Composite;
namespace Hangfire.CompositeC1
{
public class CompositeC1StorageOptions
{
public TimeSpan JobExpirationCheckInterval { get; set; }
public TimeSpan CountersAggregateInterval { get; set; }
private TimeSpan _queuePollInterval;
public TimeSpan QueuePollInterval
{
get => _queuePollInterval;
set
{
var message = $"The QueuePollInterval property value should be positive. Given: {value}.";
Verify.IsTrue(value != TimeSpan.Zero, message);
Verify.IsTrue(value == value.Duration(), message);
_queuePollInterval = value;
}
}
private TimeSpan _slidingInvisibilityTimeout;
public TimeSpan SlidingInvisibilityTimeout
{
get => _slidingInvisibilityTimeout;
set
{
if (value <= TimeSpan.Zero)
{
throw new ArgumentOutOfRangeException("Sliding timeout should be greater than zero");
}
_slidingInvisibilityTimeout = value;
}
}
public int? DashboardJobListLimit { get; set; }
public CompositeC1StorageOptions()
{
JobExpirationCheckInterval = TimeSpan.FromHours(1);
CountersAggregateInterval = TimeSpan.FromMinutes(5);
QueuePollInterval = TimeSpan.FromSeconds(15);
SlidingInvisibilityTimeout = TimeSpan.FromSeconds(10);
DashboardJobListLimit = 10000;
}
}
}