This commit is contained in:
2025-05-03 21:12:58 +08:00
parent c2a0623482
commit d6014b3c40
19 changed files with 115 additions and 35 deletions

33
src/services/xhs-task.ts Normal file
View File

@@ -0,0 +1,33 @@
import { Queue } from 'bullmq';
import { app } from '@kevisual/xhs/index';
import { QueryRouterServer } from '@kevisual/router';
type XhsTaskOptions = {
queue: Queue;
};
export class XhsTask {
queue: Queue;
constructor(opts: XhsTaskOptions) {
this.queue = opts.queue;
}
async getUnread() {
const res = await app.call({
path: 'mention',
key: 'getUnread',
});
}
}
const qs = new QueryRouterServer();
qs.route({
path: 'task',
key: 'getUnread',
})
.define(async (ctx) => {
const unread_count = 0;
if (unread_count > 0) {
}
})
.addTo(qs);