fix(llm): 修复模型更新时的空指针异常
- 在 FineTuningTaskSyncService 类中的定时任务方法中增加了对 hostUrl 的空值检查 - 如果 hostUrl 为空,则跳过当前迭代,避免出现空指针异常
This commit is contained in:
parent
a665811e45
commit
e3fce0d4c9
@ -16,6 +16,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ -179,6 +180,9 @@ public class FineTuningTaskSyncService {
|
||||
String hostUrl = getHostUrl(fineTuningTaskDO);
|
||||
FineTuningTaskDO updateObj = new FineTuningTaskDO();
|
||||
updateObj.setId(fineTuningTaskDO.getId());
|
||||
if (StringUtils.isBlank(hostUrl)){
|
||||
continue;
|
||||
}
|
||||
getCheckPoint(fineTuningTaskDO, jobModelName, hostUrl, updateObj);
|
||||
fineTuningTaskMapper.updateById(updateObj);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user