When i try to use this code it's not logging Hello, World also i noticed that my server is not runninng on localhost 3000 what i'm doing wrong? using bullmq
trying to run a function after 10 seconds how to do that? using bullmq?
import { Queue } from 'bullmq';
const myQueue = new Queue('myqueue', {
connection: {
host: 'myhost',
port: 4346,
password: 'pass'
}
});
const job = await myQueue.add('my-job', {});
const myFunction = () => {
console.log('Hello World');
};
myQueue.process('my-job', (job) => {
myFunction();
});
myQueue.resume();