[ server ] [ execution ]- optimize some controller - 2
This commit is contained in:
@@ -30,6 +30,9 @@ public class BuildStatusScheduleTask {
|
||||
@Value(value = "${octopus.status.healthy.start-delay}")
|
||||
int healthyCheckStartDelaySeconds;
|
||||
|
||||
@Value(value = "${octopus.status.metric.cron}")
|
||||
int metricReportCronExpress;
|
||||
|
||||
@Value(value = "${octopus.status.metric.pinch}")
|
||||
int metricReportTimePinch;
|
||||
|
||||
@@ -64,16 +67,16 @@ public class BuildStatusScheduleTask {
|
||||
long totalSeconds = (nextValidTime.getTime() - now.getTime()) / 1000;
|
||||
metricReportTimesCount = (int) (totalSeconds / metricReportTimePinch) - 1;
|
||||
|
||||
System.out.println("totalSeconds = " + totalSeconds);
|
||||
System.out.println("metricReportTimesCount = " + metricReportTimesCount);
|
||||
/*System.out.println("totalSeconds = " + totalSeconds);
|
||||
System.out.println("metricReportTimesCount = " + metricReportTimesCount);*/
|
||||
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>();
|
||||
map.put(METRIC_REPORT_TIME_PINCH,metricReportTimePinch);
|
||||
map.put(METRIC_REPORT_TIMES_COUNT,metricReportTimesCount);
|
||||
map.put(METRIC_REPORT_TIME_PINCH, metricReportTimePinch);
|
||||
map.put(METRIC_REPORT_TIMES_COUNT, metricReportTimesCount);
|
||||
|
||||
// build the Job 只发送一次消息,然后让Agent获取消息 (重复间隔,重复次数) 进行相应的处理!
|
||||
// todo 解决创建太多对象的问题,需要缓存相应的内容
|
||||
|
||||
Reference in New Issue
Block a user