refactor: 将数据库从MongoDB迁移至PostgreSQL

This commit is contained in:
2026-03-18 13:17:59 +08:00
parent 16723e5b5e
commit 3ed275bd7e
14 changed files with 268 additions and 210 deletions

18
main.go
View File

@@ -6,12 +6,12 @@ import (
"oss/service"
"time"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/os/gtimer"
"gitea.com/red-future/common/http"
"gitea.com/red-future/common/jaeger"
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
_ "github.com/gogf/gf/contrib/nosql/redis/v2"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/os/gtimer"
)
func main() {
@@ -30,18 +30,6 @@ func main() {
}
})
// 启动消息队列消费者
//if err := message.StartConsumers(ctx, &message.RedisMessageConfig{
// StreamKey: mongo.LogRedisKey,
// GroupName: consts.GroupName,
// ConsumerName: consts.ConsumerName,
// BatchSize: consts.BatchSize,
// AutoAck: consts.AutoAck,
// HandleFunc: logService.OperationLog.AddOperationLog,
//}); err != nil {
// return
//}
// 保持应用运行
select {}
}