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

MetadataHub doesn't send changes for beatmaps entering (or leaving) a graveyarded state #165

Open
peppy opened this issue May 5, 2023 · 0 comments

Comments

@peppy
Copy link
Member

peppy commented May 5, 2023

As mentioned in ppy/osu#23159

Currently we are only conveying change information when a user is responsible for making a change to a beatmap. Eventually we'll want to change this to also include automated (or manual) changes to beatmap status which aren't triggered by a BSS change.

Relevant code:

public async Task<BeatmapUpdates> GetUpdatedBeatmapSets(int? lastQueueId, int limit = 50)
{
var connection = await getConnectionAsync();
if (lastQueueId.HasValue)
{
var items = (await connection.QueryAsync<bss_process_queue_item>("SELECT * FROM bss_process_queue WHERE status = 2 AND queue_id > @lastQueueId LIMIT @limit", new
{
lastQueueId,
limit
})).ToArray();
return new BeatmapUpdates(items.Select(i => i.beatmapset_id).ToArray(), items.LastOrDefault()?.queue_id ?? lastQueueId.Value);
}
var lastEntry = await connection.QueryFirstOrDefaultAsync<bss_process_queue_item>("SELECT * FROM bss_process_queue WHERE status = 2 ORDER BY queue_id DESC LIMIT 1");
return new BeatmapUpdates(Array.Empty<int>(), lastEntry?.queue_id ?? 0);
}

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

No branches or pull requests

1 participant