-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow specifying queue name & scope of calculation in queue processor
- Loading branch information
Showing
2 changed files
with
25 additions
and
5 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
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,13 +1,30 @@ | ||
// 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 JetBrains.Annotations; | ||
using McMaster.Extensions.CommandLineUtils; | ||
using osu.Server.DifficultyCalculator.Commands; | ||
|
||
namespace osu.Server.Queues.BeatmapProcessor | ||
{ | ||
[Command] | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
[Argument(0, "mode", "The target mode to process the beatmaps from the queue in.")] | ||
[UsedImplicitly] | ||
private ProcessingMode processingMode { get; } = ProcessingMode.All; | ||
|
||
[Argument(1, "queue-name", "The name of the queue to watch. The `osu-queue:` prefix must be omitted.")] | ||
[UsedImplicitly] | ||
private string queueName { get; } = "beatmap"; | ||
|
||
public static void Main(string[] args) => CommandLineApplication.Execute<Program>(args); | ||
|
||
[UsedImplicitly] | ||
public int OnExecute(CommandLineApplication app) | ||
{ | ||
new BeatmapProcessor().Run(); | ||
new BeatmapProcessor(processingMode, queueName).Run(); | ||
return 0; | ||
} | ||
} | ||
} |