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

Priority doesn't seem to be taking effect #2733

Open
admangan opened this issue May 7, 2024 · 2 comments
Open

Priority doesn't seem to be taking effect #2733

admangan opened this issue May 7, 2024 · 2 comments

Comments

@admangan
Copy link

admangan commented May 7, 2024

I am curious whether anyone else has used the new implementation of priority (1 being highest on down) successfully. I use bull to run tasks made up of small sub jobs, some tasks need to be run first. Despite setting up priority properly (I see it in the job options) the queue continues processing in a FIFO manner.

Am I missing something in the set up? Do I need to adjust queue set up ( I am running this in a nest js app).

Any help is appreciated.

@manast
Copy link
Member

manast commented May 8, 2024

Yes, we have tests that cover all the priority functionality: https://github.com/OptimalBits/bull/blob/develop/test/test_queue.js#L1041
It is difficult to know why it does not work for you as you are not providing a test case for us to reproduce.

If you are new to Bull you should use BullMQ instead: https://github.com/taskforcesh/bullmq

@admangan
Copy link
Author

admangan commented May 8, 2024

Thanks for the reply, we have set up our system on bull but am looking at migrating over to bullmq. Is it as compatible with the nest.js architecture?

The test you shared, started processing the jobs after all have been added. My use case is adding large numbers of jobs at different times (can only run ~50 / minute) and having the higher (lower number) priority jump ahead in the queue even though they have been added later.

I will make a test case to demonstrate this. If it affects, I am using elasticache as my redis cluster.

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