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

more than one client call getJob() with same queueNames and timeout 1800 seconds #11

Open
deveco opened this issue Nov 19, 2015 · 1 comment

Comments

@deveco
Copy link

deveco commented Nov 19, 2015

@xetorthio
@marcosnils

final String[] queueNames = {"key1", "key2"};
Jedisque jedisque = ConnectionPoolHelper.getPool().borrowObject();
List test = jedisque.getJob(1800 * 1000, 1, queueNames);

We found if more than one client call getJob() like above, sometimes all client will get the same job.
How to avoid this?
BTW, how to decide the timeout value, the time of put a job in to the queue is unpredictable.
Thanks!

@marcosnils
Copy link
Collaborator

@deveco jedisque the same way as jedis can't be used in a multithreaded environment by default. We need to implement #10 to make it happen but we haven't had the time to do so. Contribution are always welcome though 😄

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