feat: get jobs in the worker
This commit is contained in:
@@ -52,8 +52,12 @@ worker.on('failed', async (job: any, err) => {
|
|||||||
logger.log(`info`, `Worker and queue have been closed after failure.`);
|
logger.log(`info`, `Worker and queue have been closed after failure.`);
|
||||||
});
|
});
|
||||||
|
|
||||||
const existingJobs = workflowQueue.getRepeatableJobs();
|
async function jobCounts () {
|
||||||
logger.log(`info`, `jobs ${existingJobs}`)
|
const jobCounts = await workflowQueue.getJobCounts();
|
||||||
|
console.log('Jobs:', jobCounts);
|
||||||
|
}
|
||||||
|
|
||||||
|
jobCounts();
|
||||||
|
|
||||||
async function runWorkflow(fileName: string, runId: string) {
|
async function runWorkflow(fileName: string, runId: string) {
|
||||||
if (!runId) {
|
if (!runId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user