2019-03-08 05:03:38 +01:00
|
|
|
import define from '../../../define';
|
2019-03-08 13:30:12 +01:00
|
|
|
import { deliverQueue, inboxQueue } from '../../../../../queue';
|
2019-03-08 05:03:38 +01:00
|
|
|
|
|
|
|
export const meta = {
|
|
|
|
tags: ['admin'],
|
|
|
|
|
|
|
|
requireCredential: true,
|
|
|
|
requireModerator: true,
|
|
|
|
|
|
|
|
params: {}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default define(meta, async (ps) => {
|
|
|
|
const deliverJobCounts = await deliverQueue.getJobCounts();
|
2019-03-08 13:30:12 +01:00
|
|
|
const inboxJobCounts = await inboxQueue.getJobCounts();
|
2019-03-08 05:03:38 +01:00
|
|
|
|
|
|
|
return {
|
|
|
|
deliver: deliverJobCounts,
|
|
|
|
inbox: inboxJobCounts
|
|
|
|
};
|
|
|
|
});
|