mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-20 18:26:37 +08:00
fix: fix bug for issue 49, stable diffusion service not decrease img_calls
This commit is contained in:
parent
427b434ce3
commit
baddabaa16
@ -287,7 +287,8 @@ func (s *Service) callback(data CBReq) {
|
|||||||
if data.Progress < 100 && data.ImageData != "" {
|
if data.Progress < 100 && data.ImageData != "" {
|
||||||
jobVo.ImgURL = data.ImageData
|
jobVo.ImgURL = data.ImageData
|
||||||
}
|
}
|
||||||
|
// 扣减绘图次数
|
||||||
|
s.db.Where("id = ?", jobVo.UserId).UpdateColumn("img_calls", gorm.Expr("img_calls - ?", 1))
|
||||||
// 推送任务到前端
|
// 推送任务到前端
|
||||||
if client != nil {
|
if client != nil {
|
||||||
utils.ReplyChunkMessage(client, jobVo)
|
utils.ReplyChunkMessage(client, jobVo)
|
||||||
|
Loading…
Reference in New Issue
Block a user