diff --git a/lts-queue/lts-queue-mongo/src/main/java/com/lts/queue/mongo/MongoPreLoader.java b/lts-queue/lts-queue-mongo/src/main/java/com/lts/queue/mongo/MongoPreLoader.java index bfa2ba4e7..55b3c50b3 100644 --- a/lts-queue/lts-queue-mongo/src/main/java/com/lts/queue/mongo/MongoPreLoader.java +++ b/lts-queue/lts-queue-mongo/src/main/java/com/lts/queue/mongo/MongoPreLoader.java @@ -50,7 +50,7 @@ protected List load(String loadTaskTrackerNodeGroup, int offset) { Query query = template.createQuery(tableName, JobPo.class); query.field("isRunning").equal(false) .filter("triggerTime < ", SystemClock.now()) - .order(" triggerTime, priority , gmtCreated").offset(offset).limit(step); + .order(" triggerTime, priority , gmtCreated").offset(offset).limit(loadSize); return query.asList(); } diff --git a/lts-queue/lts-queue-mysql/src/main/java/com/lts/queue/mysql/MysqlPreLoader.java b/lts-queue/lts-queue-mysql/src/main/java/com/lts/queue/mysql/MysqlPreLoader.java index 4bf01dc45..f68299290 100644 --- a/lts-queue/lts-queue-mysql/src/main/java/com/lts/queue/mysql/MysqlPreLoader.java +++ b/lts-queue/lts-queue-mysql/src/main/java/com/lts/queue/mysql/MysqlPreLoader.java @@ -59,7 +59,7 @@ protected List load(String loadTaskTrackerNodeGroup, int offset) { Long now = SystemClock.now(); return sqlTemplate.query(getRealSql(takeSelectSQL, loadTaskTrackerNodeGroup), ResultSetHandlerHolder.JOB_PO_LIST_RESULT_SET_HANDLER, - false, now, offset, step); + false, now, offset, loadSize); } catch (SQLException e) { return null; }