add new constructor to redisscheduler
parent
0f2c5b5723
commit
f21097421b
|
@ -29,6 +29,10 @@ public class RedisScheduler implements Scheduler {
|
||||||
pool = new JedisPool(new JedisPoolConfig(), host);
|
pool = new JedisPool(new JedisPoolConfig(), host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RedisScheduler(JedisPool pool) {
|
||||||
|
this.pool = pool;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void push(Request request, Task task) {
|
public synchronized void push(Request request, Task task) {
|
||||||
Jedis jedis = pool.getResource();
|
Jedis jedis = pool.getResource();
|
||||||
|
|
Loading…
Reference in New Issue