Skip to content

Commit

Permalink
优化心跳修改时长
Browse files Browse the repository at this point in the history
  • Loading branch information
qmdx committed Jul 19, 2019
1 parent 5e7a18f commit 884c793
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class JobsServiceImpl implements IJobsService {
@Override
public boolean callback(List<HandleCallbackParam> handleCallbackParamList) {
for (HandleCallbackParam handleCallbackParam : handleCallbackParamList) {
boolean callbackResult = callback(handleCallbackParamList);
boolean callbackResult = callback(handleCallbackParam);
log.debug("callback {}, handleCallbackParam={}, callbackResult={}",
callbackResult, handleCallbackParam, callbackResult);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface JobsConstant {
/**
* 清理时长,需比心跳稍大
*/
int CLEAN_TIMEOUT = 50;
int CLEAN_TIMEOUT = 50000;
String COMMA = ",";
/**
* API URI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ public void run() {
// 清理异常注册节点
++beat;
if (beat > JobsConstant.BEAT_TIMEOUT) {
jobsService.cleanTimeoutApp();
int result = jobsService.cleanTimeoutApp();
if (result > 0) {
System.out.println("成功清理注册:" + result);
}
beat = 0;
}
}
Expand Down

0 comments on commit 884c793

Please sign in to comment.