feat: get jobs in the worker

This commit is contained in:
karishmas6
2024-09-13 15:21:16 +05:30
parent dfab35c862
commit de41f8c7b4

View File

@@ -52,8 +52,12 @@ worker.on('failed', async (job: any, err) => {
logger.log(`info`, `Worker and queue have been closed after failure.`);
});
const existingJobs = workflowQueue.getRepeatableJobs();
logger.log(`info`, `jobs ${existingJobs}`)
async function jobCounts () {
const jobCounts = await workflowQueue.getJobCounts();
console.log('Jobs:', jobCounts);
}
jobCounts();
async function runWorkflow(fileName: string, runId: string) {
if (!runId) {