| | |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.*; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.properties.SystemProperties; |
| | | import com.zy.core.thread.*; |
| | | import com.zy.system.entity.license.LicenseVerify; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | |
| | | public void destroy() { |
| | | } |
| | | |
| | | @Component |
| | | class licenseVerifyThread { |
| | | |
| | | @Scheduled(cron = "0 0 4 * * ?") |
| | | public void licenseVerify() { |
| | | if (!new LicenseVerify().verify()){ |
| | | SystemProperties.WCS_RUNNING_STATUS.set(Boolean.FALSE); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |