mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
feat: ✨ Split off queue workers into a separate worker process
This commit is contained in:
parent
0b3e74107e
commit
1b98381242
34 changed files with 987 additions and 676 deletions
|
|
@ -3,9 +3,11 @@ import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
|
|||
import { HonoAdapter } from "@bull-board/hono";
|
||||
import { serveStatic } from "@hono/hono/bun";
|
||||
import type { OpenAPIHono } from "@hono/zod-openapi";
|
||||
import { deliveryQueue } from "~/classes/queues/delivery";
|
||||
import { fetchQueue } from "~/classes/queues/fetch";
|
||||
import { inboxQueue } from "~/classes/queues/inbox";
|
||||
import { config } from "~/packages/config-manager";
|
||||
import type { HonoEnv } from "~/types/api";
|
||||
import { deliveryQueue, fetchQueue, inboxQueue } from "~/worker";
|
||||
|
||||
export const applyToHono = (app: OpenAPIHono<HonoEnv>): void => {
|
||||
const serverAdapter = new HonoAdapter(serveStatic);
|
||||
|
|
|
|||
10
utils/redis.ts
Normal file
10
utils/redis.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import IORedis from "ioredis";
|
||||
import { config } from "~/packages/config-manager/index.ts";
|
||||
|
||||
export const connection = new IORedis({
|
||||
host: config.redis.queue.host,
|
||||
port: config.redis.queue.port,
|
||||
password: config.redis.queue.password,
|
||||
db: config.redis.queue.database,
|
||||
maxRetriesPerRequest: null,
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue