mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
streak-recompute: only update changed rows
This commit is contained in:
parent
08a5e7f761
commit
30559ba043
1 changed files with 10 additions and 8 deletions
|
|
@ -35,6 +35,7 @@ for await (const { pubkey } of statsQuery.stream(10)) {
|
||||||
start = createdAt;
|
start = createdAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (start && end) {
|
||||||
await kysely
|
await kysely
|
||||||
.updateTable('author_stats')
|
.updateTable('author_stats')
|
||||||
.set({
|
.set({
|
||||||
|
|
@ -44,5 +45,6 @@ for await (const { pubkey } of statsQuery.stream(10)) {
|
||||||
.where('pubkey', '=', pubkey)
|
.where('pubkey', '=', pubkey)
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Deno.exit();
|
Deno.exit();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue