fixes
This commit is contained in:
parent
aa9d5d72be
commit
0307bacd30
@ -81,9 +81,7 @@ export class ProfileCacheRelayWorker extends EventEmitter<CacheEvents> implement
|
||||
this.emit("change", mapped);
|
||||
}
|
||||
|
||||
async update<TWithCreated extends CachedMetadata & { created: number; loaded: number }>(
|
||||
m: TWithCreated,
|
||||
): Promise<"new" | "refresh" | "updated" | "no_change"> {
|
||||
async update(): Promise<"new" | "refresh" | "updated" | "no_change"> {
|
||||
// do nothing
|
||||
return "refresh";
|
||||
}
|
||||
|
@ -157,11 +157,13 @@ export class WorkerRelay extends EventEmitter<WorkerRelayEvents> {
|
||||
});
|
||||
let eventInserted = (this.#db?.changes() as number) > 0;
|
||||
if (eventInserted) {
|
||||
for (const t of ev.tags.filter(a => a[0].length === 1)) {
|
||||
db.exec("insert into tags(event_id, key, value) values(?, ?, ?)", {
|
||||
bind: [ev.id, t[0], t[1]],
|
||||
});
|
||||
}
|
||||
db.transaction(db => {
|
||||
for (const t of ev.tags.filter(a => a[0].length === 1)) {
|
||||
db.exec("insert into tags(event_id, key, value) values(?, ?, ?)", {
|
||||
bind: [ev.id, t[0], t[1]],
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
this.#seenInserts.add(ev.id);
|
||||
return eventInserted;
|
||||
|
Loading…
x
Reference in New Issue
Block a user