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

Search this tube not works if peeked job has the highest JID #19

Closed
MartinMikita opened this issue May 30, 2018 · 0 comments
Closed

Search this tube not works if peeked job has the highest JID #19

MartinMikita opened this issue May 30, 2018 · 0 comments
Labels

Comments

@MartinMikita
Copy link

MartinMikita commented May 30, 2018

Description

The Search this tube is not working, if the peeked job from the Tube has the highest JID - was the last one added with a higher priority than other jobs.

Steps to reproduce the issue:

  1. create a new tube
  2. insert 5 same tasks with normal priority, insert 1 same task with higher priority (priority number is lower)
  3. search for the common text in all 6 tasks
  4. you will see only 1 result, instead of 6 results

The problematic is the code here and here:

You should not start with the JID of the peeked job, but probably you should try to find the lowest JID or start from the 0. Or just peek all ready jobs, without releasing them.

Describe the results you received:
1 result returned for the search

Describe the results you expected:
6 results, of each task in the queue

Output of go version:

beanstalkd 1.10
aurora version 2.1

no go installed on the machine

Environment details (OS, physical, etc.):

Linux Debian 8, virtual machine, but not relevant.

@xuri xuri added the bug label Jan 13, 2019
@xuri xuri closed this as completed in d74e81b Jan 13, 2019
xuri added a commit that referenced this issue Jan 13, 2019
Fixes #19 search by calculating maximum job ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants