add new constructor to redisscheduler

master
yihua.huang 2013-08-11 18:53:13 +08:00
parent 0f2c5b5723
commit f21097421b
1 changed files with 5 additions and 1 deletions

View File

@ -29,6 +29,10 @@ public class RedisScheduler implements Scheduler {
pool = new JedisPool(new JedisPoolConfig(), host);
}
public RedisScheduler(JedisPool pool) {
this.pool = pool;
}
@Override
public synchronized void push(Request request, Task task) {
Jedis jedis = pool.getResource();