Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying queue name & scope of calculation in queue processor #227

Merged
merged 3 commits into from
Dec 13, 2023

Conversation

bdach
Copy link
Contributor

@bdach bdach commented Dec 12, 2023

The end goal of this pull request is to be able to split queue processing of beatmaps into two parts: one that populates difficulty attributes exclusively, and one that populates scoring attributes only.

As per usage instructions:

Usage: osu.Server.Queues.BeatmapProcessor [options] <mode> <queue-name>

Arguments:
  mode          The target mode to process the beatmaps from the queue in.
                Allowed values are: All, Difficulty, ScoreAttributes.
                Default value is: All.
  queue-name    The name of the queue to watch. The `osu-queue:` prefix must be omitted.
                Default value is: beatmap.

Options:
  -?|-h|--help  Show help information.

So you'd potentially have two instances of the processor running:

$ dotnet run osu.Server.Queues.BeatmapProcessor Difficulty beatmap-difficulty
$ dotnet run osu.Server.Queues.BeatmapProcessor ScoreAttributes beatmap-score-attributes

correspondingly. The queue-name param feels a little redundant maybe and could be replaced by an implicit hardcoded mapping, but this felt better?

Notably, when the processor is ran without arguments, the defaults are such that it falls back to the current mode of operations with no change in behaviour (everything from osu-queue:beatmap is processed).

I did test this semi-manually on a local environment by pushing items to the queue manually via redis-cli. To make use of the params added here the sending end will have to be adjusted, but I am not sure that is something that I have access to at present.

@smoogipoo
Copy link
Contributor

Your understanding was correct as far as I can see 👍

@peppy peppy merged commit 6fbd071 into ppy:master Dec 13, 2023
2 checks passed
@bdach bdach deleted the queue-processor-scoping branch December 13, 2023 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants