From 32a9f446b0144494d68557be1a2d9f3d52ef2af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=85=AB?= Date: Mon, 3 Aug 2020 00:17:46 +0800 Subject: [PATCH] [fix] fix the bug of worker score not cached --- .../github/kfcfans/powerjob/common/model/SystemMetrics.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/powerjob-common/src/main/java/com/github/kfcfans/powerjob/common/model/SystemMetrics.java b/powerjob-common/src/main/java/com/github/kfcfans/powerjob/common/model/SystemMetrics.java index 4f13accb..e1c384a4 100644 --- a/powerjob-common/src/main/java/com/github/kfcfans/powerjob/common/model/SystemMetrics.java +++ b/powerjob-common/src/main/java/com/github/kfcfans/powerjob/common/model/SystemMetrics.java @@ -56,7 +56,8 @@ public class SystemMetrics implements OmsSerializable, Comparable cpuScore = 1; } - return (int) (memScore + cpuScore); + score = (int) (memScore + cpuScore); + return score; } /**