fix: 修复构建配置和运行时错误处理

This commit is contained in:
leonincs
2026-05-20 16:34:46 +08:00
parent 732e284369
commit 9c00e06b1f
18 changed files with 234 additions and 57 deletions

View File

@@ -35,7 +35,9 @@ func StartOutboxPoller(db *gorm.DB, tmq *rabbitmq.TimelineMQ) {
err := tmq.PublishVideo(context.Background(), msg.VideoID, msg.CreateTime)
if err == nil {
db.Delete(&msg)
if err := db.Delete(&msg).Error; err != nil {
log.Printf("删除 outbox 消息失败: id=%d, err=%v", msg.ID, err)
}
} else {
log.Printf("投递MQ失败: VideoID: %d, err: %v", msg.VideoID, err)
}