|
@@ -12,6 +12,7 @@ import cn.sagacloud.server.algorithm.models.scheduler.SagaCheckResult
|
|
|
import cn.sagacloud.server.algorithm.models.scheduler.UnitCheckResult
|
|
|
import cn.sagacloud.server.algorithm.services.BaseDataService
|
|
|
import cn.sagacloud.server.algorithm.services.CommonService
|
|
|
+import cn.sagacloud.server.algorithm.services.endpoint.ModelFileService
|
|
|
import cn.sagacloud.server.algorithm.services.excel.ExcelService
|
|
|
import cn.sagacloud.server.algorithm.services.message.MessageService
|
|
|
import cn.sagacloud.server.algorithm.services.modelCheck.TaskService
|
|
@@ -19,6 +20,7 @@ import cn.sagacloud.server.algorithm.services.monitor.ModelMonitorService
|
|
|
import com.alibaba.fastjson.JSON
|
|
|
import com.alibaba.fastjson.JSONObject
|
|
|
import com.sybotan.database.SFilter
|
|
|
+import com.sybotan.service.models.requests.SUpdateRequest
|
|
|
import com.sybotan.service.utils.SSpringContextUtil
|
|
|
import org.slf4j.LoggerFactory
|
|
|
import org.springframework.beans.factory.annotation.Autowired
|
|
@@ -57,6 +59,7 @@ class DataCheckState_10 : ModelState {
|
|
|
*/
|
|
|
override fun prepareModel() {
|
|
|
modelList = dataService.modelFileService.select(SFilter.eq("status", 10), SFilter.eq("removed", false)).exec()
|
|
|
+// modelList = dataService.modelFileService.select(SFilter.eq("id","101c741c879c11eb8c275fda20e508c5")).exec()
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -103,7 +106,7 @@ class DataCheckState_10 : ModelState {
|
|
|
monitorService.endSchedulerCheckDownload(it.id!!, task!!.downloadFinishTime)
|
|
|
when (task!!.status) {
|
|
|
2 -> {
|
|
|
- //monitorService.beginCheck(it.id!!, checkTime)
|
|
|
+ monitorService. beginCheck(it.id!!, checkTime)
|
|
|
}
|
|
|
3 -> {
|
|
|
// 失败, 文件下载异常
|
|
@@ -212,6 +215,10 @@ class DataCheckState_10 : ModelState {
|
|
|
monitorService.modelCheck(it.id!!, singleModelCheckBegin!!, singleModelCheckEnd!!)
|
|
|
messageService.sendMessage(message)
|
|
|
}
|
|
|
+ val request = SUpdateRequest<ModelFile>()
|
|
|
+ request.content = updateList
|
|
|
+ dataService.modelFileService.updateList(request)
|
|
|
+
|
|
|
} catch (e: Exception) {
|
|
|
monitorService.modelCheck(it.id!!, e.message + CommonService.getStackTrace(e), false)
|
|
|
}
|