Some progress towards accepting and rejecting follows #3

Merged
steffo merged 22 commits from feature/follows into main 2024-10-23 05:47:18 +00:00
2 changed files with 8 additions and 1 deletions
Showing only changes of commit 0df82ac931 - Show all commits

View file

@ -1,6 +1,7 @@
import Postgres from "@@npm/postgres"
import { getLogger } from "@logtape/logtape"
import { exportJwk, generateCryptoKeyPair, KvStore } from "@fedify/fedify"
import { exportJwk, generateCryptoKeyPair, KvStore, MessageQueue } from "@fedify/fedify"
import { PostgresMessageQueue } from "@fedify/postgres"
import { PostgresKvStore } from "@fedify/postgres/kv"
@ -50,6 +51,11 @@ export class Database {
return new PostgresKvStore(this.sql, {})
}
useAsMessageQueue(): MessageQueue {
l.info`Creating Postgres message queue...`
return new PostgresMessageQueue(this.sql, {})
}
async #doQueryFile<T>(path: string, variables: Postgres.ParameterOrJSON<any>[] = []): Promise<Postgres.RowList<T[]>> {
try {
l.debug`Running query at ${path}...`

View file

@ -23,6 +23,7 @@ export class DotinoVeloce {
this.federation = createFederation<ContextData>({
kv: db.useAsKvStore(),
queue: db.useAsMessageQueue(),
})
this.federation