mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
feat(api): ✨ Finish push notification delivery
This commit is contained in:
parent
d096ab830c
commit
d839c274b1
12 changed files with 457 additions and 9 deletions
18
classes/queues/push.ts
Normal file
18
classes/queues/push.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Queue } from "bullmq";
|
||||
import { connection } from "~/utils/redis.ts";
|
||||
|
||||
export enum PushJobType {
|
||||
Notify = "notify",
|
||||
}
|
||||
|
||||
export type PushJobData = {
|
||||
psId: string;
|
||||
type: string;
|
||||
relatedUserId: string;
|
||||
noteId?: string;
|
||||
notificationId: string;
|
||||
};
|
||||
|
||||
export const pushQueue = new Queue<PushJobData, void, PushJobType>("push", {
|
||||
connection,
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue