feat: a button to do all profile recalcs

This commit is contained in:
zk
2026-05-18 15:12:38 +00:00
parent 14ccaf20fb
commit 1d7a97dc58
@@ -252,6 +252,38 @@ export default function AdminOperationsPage() {
</Card>
</Col>
<Col lg={6}>
<Card>
<Card.Header>Recalc game profiles</Card.Header>
<Card.Body>
<p className="text-muted small mb-3">
Enqueues every game profile and every distinct committed score
(user, game) pair into
<code className="mx-1">game_profile_dirty</code>, then drains that
queue until idle (all games). This request waits until processing
finishes.
</p>
<Button
onClick={() => {
void APIFetchV1(
`/admin/recalc-profiles`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({}),
},
true,
true,
);
}}
variant="primary"
>
Recalc all profiles
</Button>
</Card.Body>
</Card>
</Col>
<Col lg={6}>
<Card>
<Card.Header>Recalc scores</Card.Header>