From b5e396f66ea30c36c722078b754d3f5bcf5ffacc Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Tue, 26 Sep 2023 21:33:31 +0800 Subject: [PATCH] bugfix counting wrong tasks num of collector (#1265) --- .../hertzbeat/manager/scheduler/CollectorAndJobScheduler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/src/main/java/org/dromara/hertzbeat/manager/scheduler/CollectorAndJobScheduler.java b/manager/src/main/java/org/dromara/hertzbeat/manager/scheduler/CollectorAndJobScheduler.java index 7ed8a56d8ea..2c7280d0145 100644 --- a/manager/src/main/java/org/dromara/hertzbeat/manager/scheduler/CollectorAndJobScheduler.java +++ b/manager/src/main/java/org/dromara/hertzbeat/manager/scheduler/CollectorAndJobScheduler.java @@ -369,8 +369,8 @@ public long addAsyncCollectJob(Job job, String collector) { log.error("there is no collector name: {} online to assign job.", collector); return jobId; } + node.getAssignJobs().addPinnedJob(jobId); } - node.getAssignJobs().addPinnedJob(jobId); if (CommonConstants.MAIN_COLLECTOR_NODE.equals(node.getIdentity())) { collectJobService.addAsyncCollectJob(job); } else {