xetorthio/jedisque

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

deveco opened this issue · 1 comments

@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!

@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 😄