package com.gyee.frame.common.quartz.task;


import com.gyee.frame.common.websocket.WebsocketMessageService;
import com.gyee.frame.service.health.HealthMainService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

@Component("healthMatrixTask")
public class HealthMatrixTask {
    @Resource
    private HealthMainService healthMainService;
    @Resource
    private WebsocketMessageService websocketMessageService;

    public void healthMatrixTask(String destination) throws Exception {

        Map<String, Object> map=healthMainService.findHealthMatrix();

        websocketMessageService.SendAlertToAll(destination,map);
    }
}
