更新到数据库

This commit is contained in:
2023-06-22 05:31:22 +08:00
parent b8f871d676
commit 546ff57d6a

View File

@@ -175,7 +175,8 @@ func ImagesPost(w http.ResponseWriter, r *http.Request) {
// 推理图像
go model.Inference(image_list, func(img models.Image) {
log.Println("推理完成")
images_websocket_manager.NotifyTaskChange(task, img)
images_websocket_manager.NotifyTaskChange(task, img) // 通知 websocket
configs.ORMDB().Model(&img).Updates(img) // 更新到数据库
})
// 存储图片信息到数据库