forked from cory/tildefriends
core: sqlite checkpoint tweaks. Switch the periodic checkpoint to passive mode. Truncate mode was painful on mobile. I'm seeing it succeed often enough that we don't grow indefinitely. Also fix the print.
This commit is contained in:
@ -191,8 +191,15 @@ class TfElement extends LitElement {
|
||||
try {
|
||||
while (true) {
|
||||
let max_seen;
|
||||
for (let account_chunk = 0; account_chunk < ids.length; account_chunk += k_account_chunk_size) {
|
||||
let ids_chunk = ids.slice(account_chunk, account_chunk + k_account_chunk_size);
|
||||
for (
|
||||
let account_chunk = 0;
|
||||
account_chunk < ids.length;
|
||||
account_chunk += k_account_chunk_size
|
||||
) {
|
||||
let ids_chunk = ids.slice(
|
||||
account_chunk,
|
||||
account_chunk + k_account_chunk_size
|
||||
);
|
||||
let abouts = await tfrpc.rpc.query(
|
||||
`
|
||||
WITH
|
||||
@ -464,16 +471,18 @@ class TfElement extends LitElement {
|
||||
}
|
||||
|
||||
async load_recent_reactions() {
|
||||
this.recent_reactions = (await tfrpc.rpc.query(
|
||||
`
|
||||
this.recent_reactions = (
|
||||
await tfrpc.rpc.query(
|
||||
`
|
||||
SELECT DISTINCT content ->> '$.vote.expression' AS value
|
||||
FROM messages
|
||||
WHERE author = ? AND
|
||||
content ->> '$.type' = 'vote'
|
||||
ORDER BY timestamp DESC LIMIT 10
|
||||
`,
|
||||
[this.whoami]
|
||||
)).map((x) => x.value);
|
||||
[this.whoami]
|
||||
)
|
||||
).map((x) => x.value);
|
||||
}
|
||||
|
||||
async load() {
|
||||
|
Reference in New Issue
Block a user