mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
fix: Upscale and Variation task overrite each other
This commit is contained in:
parent
4ea7352674
commit
cf3d8af260
@ -137,6 +137,12 @@ func (s *Service) Notify(data CBReq) {
|
|||||||
} else {
|
} else {
|
||||||
tx = tx.Where("task_id = ?", split[0])
|
tx = tx.Where("task_id = ?", split[0])
|
||||||
}
|
}
|
||||||
|
// fixed: 修复 U/V 操作任务混淆覆盖的 Bug
|
||||||
|
if strings.Contains(data.Prompt, "** - Image #") { // for upscale
|
||||||
|
tx = tx.Where("type = ?", types.TaskUpscale.String())
|
||||||
|
} else if strings.Contains(data.Prompt, "** - Variations (Strong)") { // for Variations
|
||||||
|
tx = tx.Where("type = ?", types.TaskVariation.String())
|
||||||
|
}
|
||||||
res = tx.First(&job)
|
res = tx.First(&job)
|
||||||
if res.Error != nil {
|
if res.Error != nil {
|
||||||
logger.Warn("非法任务:", res.Error)
|
logger.Warn("非法任务:", res.Error)
|
||||||
|
Loading…
Reference in New Issue
Block a user