Skip to content
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

I followed the guide but does not working in my env #2424

Closed
Himly1 opened this issue Sep 16, 2022 · 5 comments
Closed

I followed the guide but does not working in my env #2424

Himly1 opened this issue Sep 16, 2022 · 5 comments

Comments

@Himly1
Copy link

Himly1 commented Sep 16, 2022

Description

I followed the guide but after I finished my work the code did not response as I expected.
Below is the image about the code and the output

Screenshot from 2022-09-16 18-19-29

You can see the output is stuck at the function add it is because i put the await at the beginning of the function call
If I remove the await statement the function will not stuck but the callback function of the process will not output anything which mean it is not calling the callback function or there is no job in the queue

here is the pic of the output of the code which removed the await statement
Screenshot from 2022-09-16 18-32-04
but still the output and the debugger tell me the callback function are not triggered... I dont know what happend, is no job in the queue or something else happend ?

Minimal, Working Test code to reproduce the issue.

(An easy to reproduce test case will dramatically decrease the resolution time.)

here is the script
script.zip

Bull version

^4.9.0

Additional information

Node version
v16.16.0
Operation system
Linux (Manjaro)

@manast
Copy link
Member

manast commented Sep 16, 2022

Which guide did you follow? the code above is not correct, for example the Queue.add call is not passing the correct arguments.

@Himly1
Copy link
Author

Himly1 commented Sep 16, 2022

@manast Thanks for your reply. I found it somewhere else but how about this one ?
bug

I copied that code from the README file of the BULL and modified a little bit but the result is the same on my laptop.
image

In my expectation the output will be
x1
x2
x3
x4

but the x4 never printed

after a long time it print the error like below
image

@manast
Copy link
Member

manast commented Sep 16, 2022

Do you have a Redis instance running? Maybe you should start with BullMQ instead: https://docs.bullmq.io there are also complete tutorials here: https://blog.taskforce.sh

@Himly1
Copy link
Author

Himly1 commented Sep 16, 2022

@manast No, did not have a redis instance running. I will check it out . thanks.

@Himly1
Copy link
Author

Himly1 commented Sep 16, 2022

@manast After I installed the redis I working good, Thank you a lot...

@Himly1 Himly1 closed this as completed Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants