package com.mvc.service.alarm;

import com.mvc.model.TServerReadModel;
import com.mvc.utils.StoreBlockingQueue;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

@Component
public class AlarmThread implements Runnable {

    @Resource
    private AlarmNoticeMana alarmNoticeMana;

    @Override
    public void run() {
        while (true) {
            try {
                TServerReadModel model = StoreBlockingQueue.gasAlarmQueue.take();
                alarmNoticeMana.sortingAlarmData(model);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
