1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2025-01-08 10:53:19 +09:00
cherrypick/src/server/api/endpoints/admin/queue/stats.ts

22 lines
437 B
TypeScript

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
};
});