Browse Source

检查锁定逻辑

miaolijing 3 năm trước cách đây
mục cha
commit
a15a41c52e

+ 1 - 1
src/main/java/com/persagy/apm/diagnose/indicatorrecord/service/impl/MonitorIndicatorRecordServiceImpl.java

@@ -364,7 +364,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
             String alarmItemCode = objIdAndAlarmItemCode.substring(indexOf + 1);
             String lockKey = AlarmConstants.alarmDataLockPrefix + objId + "-" + alarmItemCode;
             Object isLock = redisUtil.get(lockKey);
-            if (null == isLock) {
+            if (null != isLock) {
                 continue;
             }
             long time = System.currentTimeMillis() + (10 * 1000);

+ 1 - 1
src/main/java/com/persagy/apm/diagnose/maintenance/service/impl/ProjectDataRecordServiceImpl.java

@@ -289,7 +289,7 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
             String alarmItemCode = objIdAndAlarmItemCode.substring(indexOf + 1);
             String lockKey = AlarmConstants.alarmDataLockPrefix + objId + "-" + alarmItemCode;
             Object isLock = redisUtil.get(lockKey);
-            if (null == isLock) {
+            if (null != isLock) {
                 continue;
             }
             long time = System.currentTimeMillis() + (10 * 1000);