forked from ppy/osu-queue-processor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueueConfiguration.cs
More file actions
47 lines (41 loc) · 1.68 KB
/
QueueConfiguration.cs
File metadata and controls
47 lines (41 loc) · 1.68 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
namespace osu.Server.QueueProcessor
{
public class QueueConfiguration
{
/// <summary>
/// The queue to read from.
/// </summary>
public string InputQueueName { get; set; } = "default";
/// <summary>
/// The time between polls (in the case a poll returns no items).
/// </summary>
public int TimeBetweenPolls { get; set; } = 100;
/// <summary>
/// The number of items allowed to be dequeued but not processed at one time.
/// </summary>
public int MaxInFlightItems { get; set; } = 100;
/// <summary>
/// The number of times to re-queue a failed item for another attempt.
/// </summary>
public int MaxRetries { get; set; } = 3;
/// <summary>
/// The maximum number of recent errors before exiting with an error.
/// </summary>
/// <remarks>
/// Every error will increment an internal count, while every success will decrement it.
/// </remarks>
public int ErrorThreshold { get; set; } = 10;
/// <summary>
/// Setting above 1 will allow processing in batches (see <see cref="QueueProcessor{T}.ProcessResults"/>).
/// </summary>
public int BatchSize { get; set; } = 1;
/// <summary>
/// When enabled, uses <c>BRPOP</c> to wait for items instead of polling with <c>RPOP</c>.
/// </summary>
/// <remarks>
/// <see cref="BatchSize"/> is ignored when this is enabled.
/// <see cref="TimeBetweenPolls"/> is still used as a delay for when processor is overloaded.
/// </remarks>
public bool UseBlockingPop { get; set; } = false;
}
}