-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from peppy/better-disable-processors
- Loading branch information
Showing
4 changed files
with
53 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using McMaster.Extensions.CommandLineUtils; | ||
|
@@ -10,11 +11,18 @@ namespace osu.Server.Queues.ScoreStatisticsProcessor.Commands.Queue | |
[Command("watch", Description = "Begins processing of the queue.")] | ||
public class WatchQueueCommand | ||
{ | ||
private readonly ScoreStatisticsQueueProcessor queue = new ScoreStatisticsQueueProcessor(); | ||
/// <summary> | ||
/// A comma-separated list of processors to disable. | ||
/// </summary> | ||
[Option("--disable", Description = "A comma-separated list of processors to disable.")] | ||
public string DisabledProcessors { get; set; } = string.Empty; | ||
|
||
public Task<int> OnExecuteAsync(CancellationToken cancellationToken) | ||
{ | ||
ScoreStatisticsQueueProcessor queue = new ScoreStatisticsQueueProcessor(DisabledProcessors.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)); | ||
|
||
queue.Run(cancellationToken); | ||
|
||
return Task.FromResult(0); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters