package com.ctrip.zeus.service.status;

import com.ctrip.zeus.dal.core.TaskDao;
import com.ctrip.zeus.util.S;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * Created by fanqq on 2015/11/12.
 */
public class HealthCheckFetchJob extends QuartzJobBean {
    private HealthCheckStatusService healthCheckStatusService ;
    private Logger logger = LoggerFactory.getLogger(this.getClass());
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        try {
            healthCheckStatusService.freshHealthCheckStatus();
        } catch (Exception e) {
            logger.error("[HealthCheckFetchJob] HealthCheckFetch Exception! ServerIp:" + S.getIp(), e);
        }
    }
    public void setHealthCheckStatusService(HealthCheckStatusService healthCheckStatusService) {
        this.healthCheckStatusService = healthCheckStatusService;
    }
}

@@ -103,16 +103,63 @@
 util.S;%0A
+import org.quartz.DisallowConcurrentExecution;%0A
 import o
@@ -391,16 +391,45 @@
 12.%0A */%0A
+@DisallowConcurrentExecution%0A
 public c

add @DisallowConcurrentExecution to health check fetch job