|
@@ -66,9 +66,7 @@ public class AttendanceSignDispatchTask {
|
|
|
if (!highFrequency && now.getMinute() % 5 != 0) {
|
|
if (!highFrequency && now.getMinute() % 5 != 0) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
attendanceSignRecordService.getSaveSignRecord();
|
|
attendanceSignRecordService.getSaveSignRecord();
|
|
|
- attendanceSignRecordService.getDelayedSign();
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.error("syncSignData error ----",e);
|
|
log.error("syncSignData error ----",e);
|
|
@@ -78,4 +76,24 @@ public class AttendanceSignDispatchTask {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Scheduled(cron ="0 * * * * ? ")
|
|
|
|
|
+ public void getDelayedSign() throws ParseException {
|
|
|
|
|
+
|
|
|
|
|
+ if (!syncLock.tryLock()) {
|
|
|
|
|
+ log.warn("syncSignData 正在执行中,本次调度跳过");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ if(!"prod".equals(environment)) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ attendanceSignRecordService.getDelayedSign();
|
|
|
|
|
+
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("syncSignData error ----",e);
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ // 👉 确保一定释放锁(防死锁)
|
|
|
|
|
+ syncLock.unlock();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|