@@ -28,21 +28,23 @@ public class PostgreSqlStorageOptions
28
28
private TimeSpan _queuePollInterval ;
29
29
private TimeSpan _invisibilityTimeout ;
30
30
private TimeSpan _distributedLockTimeout ;
31
+ private TimeSpan _transactionSerializationTimeout ;
31
32
32
33
public PostgreSqlStorageOptions ( )
33
34
{
34
35
QueuePollInterval = TimeSpan . FromSeconds ( 15 ) ;
35
36
InvisibilityTimeout = TimeSpan . FromMinutes ( 30 ) ;
36
37
DistributedLockTimeout = TimeSpan . FromMinutes ( 10 ) ;
38
+ TransactionSynchronisationTimeout = TimeSpan . FromMilliseconds ( 500 ) ;
37
39
SchemaName = "hangfire" ;
38
40
UseNativeDatabaseTransactions = true ;
39
41
PrepareSchemaIfNecessary = true ;
40
42
}
41
43
42
44
public TimeSpan QueuePollInterval
43
45
{
44
- get { return _queuePollInterval ; }
45
- set
46
+ get => _queuePollInterval ;
47
+ set
46
48
{
47
49
ThrowIfValueIsNotPositive ( value , nameof ( QueuePollInterval ) ) ;
48
50
_queuePollInterval = value ;
@@ -51,8 +53,8 @@ public TimeSpan QueuePollInterval
51
53
52
54
public TimeSpan InvisibilityTimeout
53
55
{
54
- get { return _invisibilityTimeout ; }
55
- set
56
+ get => _invisibilityTimeout ;
57
+ set
56
58
{
57
59
ThrowIfValueIsNotPositive ( value , nameof ( InvisibilityTimeout ) ) ;
58
60
_invisibilityTimeout = value ;
@@ -61,14 +63,24 @@ public TimeSpan InvisibilityTimeout
61
63
62
64
public TimeSpan DistributedLockTimeout
63
65
{
64
- get { return _distributedLockTimeout ; }
65
- set
66
+ get => _distributedLockTimeout ;
67
+ set
66
68
{
67
69
ThrowIfValueIsNotPositive ( value , nameof ( DistributedLockTimeout ) ) ;
68
70
_distributedLockTimeout = value ;
69
71
}
70
72
}
71
73
74
+ public TimeSpan TransactionSynchronisationTimeout
75
+ {
76
+ get => _transactionSerializationTimeout ;
77
+ set
78
+ {
79
+ ThrowIfValueIsNotPositive ( value , nameof ( TransactionSynchronisationTimeout ) ) ;
80
+ _transactionSerializationTimeout = value ;
81
+ }
82
+ }
83
+
72
84
public bool UseNativeDatabaseTransactions { get ; set ; }
73
85
public bool PrepareSchemaIfNecessary { get ; set ; }
74
86
public string SchemaName { get ; set ; }
0 commit comments