kopia lustrzana https://github.com/cloudflare/wildebeest
fix consumer missing import
rodzic
aee2908193
commit
dd8662ba57
|
@ -1,4 +1,5 @@
|
|||
import type { InboxMessageBody } from 'wildebeest/backend/src/types/queue'
|
||||
import { getDatabase } from 'wildebeest/backend/src/database'
|
||||
import * as activityHandler from 'wildebeest/backend/src/activitypub/activities/handle'
|
||||
import * as notification from 'wildebeest/backend/src/mastodon/notification'
|
||||
import * as timeline from 'wildebeest/backend/src/mastodon/timeline'
|
||||
|
@ -8,7 +9,7 @@ import type { Env } from './'
|
|||
|
||||
export async function handleInboxMessage(env: Env, actor: Actor, message: InboxMessageBody) {
|
||||
const domain = env.DOMAIN
|
||||
const db = getDatabase(env)
|
||||
const db = getDatabase(env as any)
|
||||
const adminEmail = env.ADMIN_EMAIL
|
||||
const cache = cacheFromEnv(env)
|
||||
const activity = message.activity
|
||||
|
|
|
@ -20,10 +20,11 @@ export type Env = {
|
|||
export default {
|
||||
async queue(batch: MessageBatch<MessageBody>, env: Env, ctx: ExecutionContext) {
|
||||
const sentry = initSentryQueue(env, ctx)
|
||||
const db = getDatabase(env as any)
|
||||
|
||||
try {
|
||||
for (const message of batch.messages) {
|
||||
const actor = await actors.getActorById(getDatabase(env), new URL(message.body.actorId))
|
||||
const actor = await actors.getActorById(db, new URL(message.body.actorId))
|
||||
if (actor === null) {
|
||||
console.warn(`actor ${message.body.actorId} is missing`)
|
||||
return
|
||||
|
|
Ładowanie…
Reference in New Issue