mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 12:36:00 +08:00
proto modify
This commit is contained in:
+30
-3
@@ -2,7 +2,9 @@ package main
|
||||
|
||||
import (
|
||||
"OpenIM/internal/task"
|
||||
"OpenIM/internal/tools"
|
||||
"OpenIM/pkg/common/config"
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"time"
|
||||
@@ -22,8 +24,33 @@ func main() {
|
||||
var userIDFixSeq = flag.String("user_id_fix_seq", "", "userID to Fix Seq")
|
||||
var superGroupIDFixSeq = flag.String("super_group_id_fix_seq", "", "super groupID to fix Seq")
|
||||
var fixAllSeq = flag.Bool("fix_all_seq", false, "fix seq")
|
||||
|
||||
flag.Parse()
|
||||
fmt.Println(time.Now(), "start cronTask", *userIDFixSeq, *superGroupIDFixSeq)
|
||||
task.FixSeq(*userID, *superGroupID, *fixAllSeq)
|
||||
msgTool, err := tools.InitMsgTool()
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
ctx := context.Background()
|
||||
if userIDFixSeq != nil {
|
||||
msgTool.GetAndFixUserSeqs(ctx, *userIDFixSeq)
|
||||
}
|
||||
if superGroupIDFixSeq != nil {
|
||||
msgTool.FixGroupSeq(ctx, *superGroupIDFixSeq)
|
||||
}
|
||||
if fixAllSeq != nil {
|
||||
msgTool.FixAllSeq(ctx)
|
||||
}
|
||||
if userIDClearMsg != nil {
|
||||
msgTool.ClearUsersMsg(ctx, []string{*userIDClearMsg})
|
||||
}
|
||||
|
||||
if superGroupIDClearMsg != nil {
|
||||
msgTool.ClearSuperGroupMsg(ctx, []string{*superGroupIDClearMsg})
|
||||
}
|
||||
if userIDShowSeq != nil {
|
||||
msgTool.ShowUserSeqs(ctx, *userIDShowSeq)
|
||||
}
|
||||
|
||||
if superGroupIDShowSeq != nil {
|
||||
msgTool.ShowSuperGroupSeqs(ctx, *superGroupIDShowSeq)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user