ジョブの数を一覧できるように
This commit is contained in:
21
src/server/api/endpoints/admin/queue/stats.ts
Normal file
21
src/server/api/endpoints/admin/queue/stats.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import define from '../../../define';
|
||||
import { deliverQueue } from '../../../../../queue';
|
||||
|
||||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
|
||||
params: {}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
const deliverJobCounts = await deliverQueue.getJobCounts();
|
||||
const inboxJobCounts = await deliverQueue.getJobCounts();
|
||||
|
||||
return {
|
||||
deliver: deliverJobCounts,
|
||||
inbox: inboxJobCounts
|
||||
};
|
||||
});
|
Reference in New Issue
Block a user