feat(ugc): staff reprocessing of a property goes to the front of the queue

/reprocessproperty and the dashboard's Reprocess all models mark the
property's models as priority (ugc.priority, migrations mysql 94 and sqlite
77). The UGC server takes priority models first, polls them even when its
queue is full, and puts them at its front, as it does cars and rockets. The
flag clears once a model is made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-28 12:26:56 -05:00
parent 8d57cc82cf
commit 9e4f2818c3
12 changed files with 49 additions and 18 deletions

View File

@@ -777,7 +777,15 @@ TEST_F(ParitySeeded, UgcModel) {
model.id = 1152921510000400009LL; model.lot = 14; model.ugcId = 1152921510000500001LL;
db.InsertNewPropertyModel(PROP1, model, "Objects_14_name");
const auto changed = db.ResetPropertyUgcModelProcessing(PROP1);
return json{ changed, infoJson(db.GetUgcProcessInfo(1152921510000500001LL)), db.ResetPropertyUgcModelProcessing(1) };
// Reset as priority: first in line, and the only one when asking for priority models; made, it's cleared
json priority = json::array();
for (const auto& model : db.GetUgcModelsToProcess(10, true)) priority.push_back({ model.id, model.priority });
const auto first = db.GetUgcModelsToProcess(10);
db.SetUgcModelProcessed(1152921510000500001LL, IUgc::eProcessState::DONE, 1, "", true);
db.ResetUgcModelProcessing(1152921510000500001LL, false);
const auto afterMade = db.GetUgcModelsToProcess(10, true).size();
return json{ changed, infoJson(db.GetUgcProcessInfo(1152921510000500001LL)), db.ResetPropertyUgcModelProcessing(1), priority,
first.empty() ? json() : json{ first.front().id, first.front().priority }, afterMade };
});
Both("Modular build processing", [&](GameDatabase& db) {
db.InsertUgcBuild("1:4713+1:4714+1:4715", 1152921510000500002LL, CHAR_ALICE);