package com.gemho.meizhou.controller;

import com.gemho.meizhou.service.UploadCloudServiceImp;
import org.springframework.beans.factory.annotation.Autowired;

public class RunMain extends Thread {

    private String name;

    private UploadCloudServiceImp uploadCloudServiceImp;

    public RunMain(){}

    public RunMain(String name, UploadCloudServiceImp uploadCloudServiceImp){
        this.name = name;
        this.uploadCloudServiceImp = uploadCloudServiceImp;
    }


    @Override
    public void run() {
        try {
            while (true) {
                uploadCloudServiceImp.other();
                // 10分钟采集一次
                Thread.sleep((1000 * 60) * 10);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
