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

Provide a way to sort jobs lists #48

Open
jadkins89 opened this issue Jun 30, 2020 · 4 comments
Open

Provide a way to sort jobs lists #48

jadkins89 opened this issue Jun 30, 2020 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@jadkins89
Copy link

jadkins89 commented Jun 30, 2020

Providing a way to sort the jobs lists by certain attributes, specifically for us delay time (being able to see which one will run next) would be very nice. Maybe something along the lines of clicking on the column name to sort asc / desc?

Secondly, along these same lines. I deal with some queues that have thousands of jobs. Would it be possible to add a page number selector instead of just incrementing through them?

Thanks for this UI tool, its great!

@hans-lizihan
Copy link
Owner

i'm afraid the ordering is not supported by bulljs

https://github.com/OptimalBits/bull/blob/develop/REFERENCE.md#queuegetjobs

however if it makes sense, it's possible to sort it in the frontend only.

for page number selector, i think you could simply modify the URL page=1 <- change it here

@jadkins89
Copy link
Author

I am thinking front end only sorting, though for large amounts of jobs there may be a noticeable delay. Pagination seems simple enough.

@hans-lizihan hans-lizihan added the enhancement New feature or request label Jul 1, 2020
@hans-lizihan hans-lizihan added this to the 1.1 milestone Jul 1, 2020
@jadkins89
Copy link
Author

Handling sorting in server/controllers/jobs.js is a viable option. You could add an additional parameter to the query that is a sort type, grab all the jobs, sort and paginate locally versus through the API. If I get time, I'll work up some code.

@hans-lizihan
Copy link
Owner

hmm that will be great @jadkins89~

Repository owner deleted a comment from mrpanday93 Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@hans-lizihan @jadkins89 and others