refactor: 将数据库从MongoDB迁移至PostgreSQL
This commit is contained in:
18
main.go
18
main.go
@@ -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 {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user