pull/2696/head
truongpx-Mac 2 years ago
parent 7e5ca46d2b
commit 593972e9c9

2
.gitignore vendored

@ -401,3 +401,5 @@ Sessionx.vim
dist/
.env
config/config.yaml
**__debug_bin

@ -147,12 +147,15 @@ object:
minio:
bucket: "openim"
# endpoint: "http://172.28.0.1:10005"
endpoint: "http:///127.0.0.1:10005"
endpoint: "http://127.0.0.1:10005"
# endpoint: "http://192.168.136.215:10005"
accessKeyID: "root"
secretAccessKey: "openIM123"
sessionToken: ''
# signEndpoint: "http://127.0.0.1:10005"
signEndpoint: "http://127.0.0.1:10005"
# signEndpoint: "http://127.0.0.1:10005"
signEndpoint: "http://172.16.3.19:10005"
# signEndpoint: "http://192.168.136.215:10005"
publicRead: false
cos:
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com

@ -37,9 +37,9 @@ import (
)
type MsgTransfer struct {
persistentCH *PersistentConsumerHandler // 聊天记录持久化到mysql的消费者 订阅的topic: ws2ms_chat
historyCH *OnlineHistoryRedisConsumerHandler // 这个消费者聚合消息, 订阅的topicws2ms_chat, 修改通知发往msg_to_modify topic, 消息存入redis后Incr Redis, 再发消息到ms2pschat topic推送 发消息到msg_to_mongo topic持久化
historyMongoCH *OnlineHistoryMongoConsumerHandler // mongoDB批量插入, 成功后删除redis中消息以及处理删除通知消息删除的 订阅的topic: msg_to_mongo
persistentCH *PersistentConsumerHandler // Topic: WS2MS_Chat subscribed to consumers who are durable to MySQL consumers
historyCH *OnlineHistoryRedisConsumerHandler // This consumer aggregation message, Topic subscribed: ws2ms_chat, modify notification to msg_to_modify topic, the message is stored in redis, and then send a message to MS2PSChat Topic push, send messages to msg_to_mongo topic durability
historyMongoCH *OnlineHistoryMongoConsumerHandler // MongoDB batch insertion, delete the message in Redis after success, and process the TOPIC: msg_to_mongo of the deleted notification message deleted
// modifyCH *ModifyMsgConsumerHandler // 负责消费修改消息通知的consumer, 订阅的topic: msg_to_modify
}

@ -54,7 +54,7 @@ type CommonMsgDatabase interface {
// 刪除redis中消息缓存
DeleteMessagesFromCache(ctx context.Context, conversationID string, seqs []int64) error
DelUserDeleteMsgsList(ctx context.Context, conversationID string, seqs []int64)
// incrSeq然后批量插入缓存
// Incrseq and then insert the cache in batches
BatchInsertChat2Cache(ctx context.Context, conversationID string, msgs []*sdkws.MsgData) (seq int64, isNewConversation bool, err error)
// 通过seqList获取mongo中写扩散消息

@ -106,6 +106,9 @@ func (c *Controller) InitiateUpload(ctx context.Context, hash string, size int64
if err != nil {
return nil, err
}
// rawURL = strings.Replace(rawURL, "127.0.0.1", "192.168.136.215", 1)
return &InitiateUploadResult{
UploadID: newMultipartUploadID(multipartUploadID{
Type: UploadTypePresigned,
@ -125,7 +128,7 @@ func (c *Controller) InitiateUpload(ctx context.Context, hash string, size int64
},
}, nil
} else {
// 分片上传
// Upload
upload, err := c.impl.InitiateMultipartUpload(ctx, c.HashPath(hash))
if err != nil {
return nil, err

Loading…
Cancel
Save