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

getJobs() start and end options are applied per job state #1454

Closed
soulchild opened this issue Sep 6, 2019 · 1 comment · Fixed by #1468
Closed

getJobs() start and end options are applied per job state #1454

soulchild opened this issue Sep 6, 2019 · 1 comment · Fixed by #1468

Comments

@soulchild
Copy link
Contributor

soulchild commented Sep 6, 2019

Don't know if this is intended behaviour, but I noticed that when using getJobs() with multiple states, the optional start and end parameters to skip/limit the results seem applied per job state. So, given this:

getJobs(['active', 'completed'], 0, 1)

and having, say 10 active and 10 completed jobs in the queue, the call yields 4 jobs: The first 2 jobs with state active, and the first two jobs with state completed. I'd have expected to just get two results.

If this is indeed intended, I suggest updating the reference manual to point this out, because it took me some time to figure out what's going on there. 😄

@soulchild
Copy link
Contributor Author

Sorry, I auto-closed this by accident.

@soulchild soulchild reopened this Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants