mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
feat(federation): ✨ Implement queue for fetches
This commit is contained in:
parent
79cf43d752
commit
5fc6c4dcfa
7 changed files with 122 additions and 26 deletions
|
|
@ -5,7 +5,7 @@ import { serveStatic } from "@hono/hono/bun";
|
|||
import type { OpenAPIHono } from "@hono/zod-openapi";
|
||||
import { config } from "~/packages/config-manager";
|
||||
import type { HonoEnv } from "~/types/api";
|
||||
import { deliveryQueue, inboxQueue } from "~/worker";
|
||||
import { deliveryQueue, fetchQueue, inboxQueue } from "~/worker";
|
||||
|
||||
export const applyToHono = (app: OpenAPIHono<HonoEnv>): void => {
|
||||
const serverAdapter = new HonoAdapter(serveStatic);
|
||||
|
|
@ -14,6 +14,7 @@ export const applyToHono = (app: OpenAPIHono<HonoEnv>): void => {
|
|||
queues: [
|
||||
new BullMQAdapter(inboxQueue),
|
||||
new BullMQAdapter(deliveryQueue),
|
||||
new BullMQAdapter(fetchQueue),
|
||||
],
|
||||
serverAdapter,
|
||||
options: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue