Some progress towards accepting and rejecting follows #3
2 changed files with 8 additions and 1 deletions
|
@ -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}...`
|
||||
|
|
|
@ -23,6 +23,7 @@ export class DotinoVeloce {
|
|||
|
||||
this.federation = createFederation<ContextData>({
|
||||
kv: db.useAsKvStore(),
|
||||
queue: db.useAsMessageQueue(),
|
||||
})
|
||||
|
||||
this.federation
|
||||
|
|
Loading…
Reference in a new issue