视频保存

This commit is contained in:
duoaohui
2026-05-19 16:15:01 +08:00
parent b158cccbfc
commit 3fe284ec5c
4 changed files with 17 additions and 4 deletions

View File

@@ -22,8 +22,8 @@ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /build/echochat ./cmd/
# --- 第二阶段:运行 ---
FROM alpine:3.19
# 安装运行时依赖(时区数据 + CA 证书)
RUN apk add --no-cache ca-certificates tzdata
# 安装运行时依赖(时区数据 + CA 证书 + 录制 WebM→MP4 转码所需 ffmpeg
RUN apk add --no-cache ca-certificates tzdata ffmpeg
# 设置时区为上海
ENV TZ=Asia/Shanghai

View File

@@ -83,5 +83,5 @@ meeting:
# 生产部署请通过环境变量 ECHOCHAT_MEETING_INTERNAL_WEBHOOK_SECRET 覆盖viper.AutomaticEnv 已开启)
internal_webhook_secret: internal-webhook-12xqs
recording_transcode_enabled: true
recording_transcode_ffmpeg_path: /home/ykf/jenkins/yuyin/ffmpeg/ffmpeg-7.0.2-amd64-static/ffmpeg
recording_transcode_ffmpeg_path: ffmpeg
recording_transcode_timeout_seconds: 600

View File

@@ -3,6 +3,7 @@ package db
import (
"context"
"errors"
"fmt"
"time"
@@ -43,6 +44,12 @@ func (l *zapGormLogger) Trace(ctx context.Context, begin time.Time, fc func() (s
zap.String("sql", sql),
}
if err != nil {
// gorm.ErrRecordNotFound 在业务侧大量被用作"是否存在"判定GetByXxx 返回 nil, nil
// 没必要在 SQL 层把它当 ERROR 刷出来,否则会误触告警;保持原 fields 在 Debug 层级即可排障
if errors.Is(err, gorm.ErrRecordNotFound) {
logs.Debug(ctx, "gorm.trace", "SQL未命中record not found", fields...)
return
}
fields = append(fields, zap.Error(err))
logs.Error(ctx, "gorm.trace", "SQL执行失败", fields...)
return