parent
037837b551
commit
0e4a111f81
1714 changed files with 20803 additions and 11751 deletions
|
@ -0,0 +1,44 @@
|
|||
import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues';
|
||||
import define from '../../../define';
|
||||
|
||||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true as const,
|
||||
requireModerator: true,
|
||||
|
||||
params: {},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
properties: {
|
||||
deliver: {
|
||||
ref: 'QueueCount'
|
||||
},
|
||||
inbox: {
|
||||
ref: 'QueueCount'
|
||||
},
|
||||
db: {
|
||||
ref: 'QueueCount'
|
||||
},
|
||||
objectStorage: {
|
||||
ref: 'QueueCount'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
const deliverJobCounts = await deliverQueue.getJobCounts();
|
||||
const inboxJobCounts = await inboxQueue.getJobCounts();
|
||||
const dbJobCounts = await dbQueue.getJobCounts();
|
||||
const objectStorageJobCounts = await objectStorageQueue.getJobCounts();
|
||||
|
||||
return {
|
||||
deliver: deliverJobCounts,
|
||||
inbox: inboxJobCounts,
|
||||
db: dbJobCounts,
|
||||
objectStorage: objectStorageJobCounts,
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue