- Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathTaskQueueConfiguration.cs
More file actions
Latest commit
39 lines (33 loc) · 1.24 KB
/
Copy pathTaskQueueConfiguration.cs
File metadata and controls
39 lines (33 loc) · 1.24 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
usingSystem;
usingGofer.NET.Utils;
namespaceGofer.NET
{
publicclassTaskQueueConfiguration
{
publicstringQueueName{get;set;}
/// <summary>
/// If a task is not removed from the backup list after this long, it is assumed to have been abandoned or its
/// consumer died. It will be reinserted into the processing queue.
/// Default: 1 hour
/// </summary>
publicTimeSpanMessageRetryTimeSpan{get;set;}
/// <summary>
/// Usage of the Task Queue in Parallel Threads, requires the thread pool size to be
/// increased.
///
/// https://stackexchange.github.io/StackExchange.Redis/Timeouts#are-you-seeing-high-number-of-busyio-or-busyworker-threads-in-the-timeout-exception
/// </summary>
publicboolThreadSafe{get;set;}
publicintBatchSize{get;set;}
publicstaticTaskQueueConfigurationDefault()
{
returnnewTaskQueueConfiguration
{
QueueName="Gofer.NET.Default",
ThreadSafe=true,
MessageRetryTimeSpan=TimeSpan.FromHours(1),
BatchSize=20
};
}
}
}