-
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
getJobLogs pagination reversed #2031
Comments
Actually I do not remember if it was intentional or not, but yes it should not be reversed. |
yes, I think the rationale was that often times you are interested in the newest logs and you browse backwards in time. So I think the solution to support both cases (as it works now and streaming logs), would be to add an "asc" parameter as we have in the other getters, by default would be false, and passing true will provide the functionality you are requesting. |
@manast I'm fine with updating, but what do you think about this comment? I'd tech be a breaking change, but if the default behavior is truly descending then we should fix the existing logic. |
In my comment here taskforcesh/bullmq#538 (comment) I wrote that I think ASC should be default since current one is actually ASC (f you call the API without start, end params), so that would probably the less "breaking change", since it is not documented the expected order anyway. |
## [3.22.6](v3.22.5...v3.22.6) (2021-05-17) ### Bug Fixes * **job:** fix job log pagination, fixes [#2031](#2031) ([30aa0a9](30aa0a9))
🎉 This issue has been resolved in version 3.22.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Implementing a UI over the bull job logs and noticed that the log pagination is reversed. I'm not sure if this is intentional, but its certainly confusing and makes implementation difficult when trying to paginate or live log stream.
Minimal, Working Test code to reproduce the issue.
This is a simple example that illustrates the problem.
Bull version
v3.22.4
The text was updated successfully, but these errors were encountered: