-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sandbox process stuck in active tab (it's not a duplicate question) #2150
Comments
Change to this code instead: export default async function (job: Job) {
console.log('Running on sandbox')
console.log(job.id)
console.log(job.data)
console.log("It is working?")
return { data: 'done' };
} |
Can you simplify your test case and just use 1 queue, test it and if it does not work please post the updated code and I will check it myself. |
I was testing again, and i realized that the sandbox works when i calling a javascript file. So i tested with this:
module.exports = async (job) => {
console.log(job)
job.log("Working from separated proccess")
return Promise.resolve({ done: true })
}; and in Queue.ts i changed this line const sandboxFile = path.resolve(__dirname, `sandbox${ext}`) to: const sandboxFile = path.resolve(__dirname, `sandbox.js`) and then the job started processing. So, probably this is related with typescript. So, there is any way to use Typescript on a sandbox process? Or basically the only way to achieve the job to be processed is using Javascript? And, i know this is not related with this issue, but i also have tried using BullMQ, and it worked only with javascript as well. So my question is, is BullMQ suitable for production and there is any difference besides the full typescript rewrite between bull.js and BullMQ? |
I found a solution. Instead of using {
"watch": ["src"],
"ext": "ts,json",
"ignore": ["src/**/*.spec.ts","node_modules","dist"],
"exec": "ts-node ./src/queue.ts"
} And now the queue are been executed even with Typescript. I would like to suggest to add a typescript section on README, because other people probably also had or are been having the same issue. |
Hi, I'm have similar problem with queue stuck in active. It moved to complete when interval reach 100 This usually happen on first queue added, the second one smoothly completed. I am using nestjs https://docs.nestjs.com/techniques/queues Sometimes it goes to completed, sometimes to failed with "Random Error" |
@msyahidin please open a new issue with reproducible code. |
Description
I know that probably this is a old question, but I'm sure i checked every issue related about this kind of error, and i couldn't find any solution.
Packages, OS and versions:
The problem
When a job is added to queue to run on a separate process, it gets stuck in active tab and doesn't returns any error, and it doesn't return a
stalled
job error. The job just get stuck in queue.Minimal, Working Test code to reproduce the issue.
(An easy to reproduce test case will dramatically decrease the resolution time.)
Command used to run with Typescript:
queue.ts
lib/Queue.ts
sandbox.ts
config/redis.ts
I'm exporting queues as an array because I'm also using Bull Dashboard.
Basically i can run any job, except jobs which are processed on a separate proccess. When i call
await BackgroundJob.add({ msg: 'job.data' })
i get this on bull dashboard:It looks like the job process start, but it never completes, and return basically nothing.
Bull version
Additional information
Thanks in advance for any help! (I gonna try to provide a codesandbox to help the reproduction)
The text was updated successfully, but these errors were encountered: