Files
open-im-server/cmd/cmdutils/main.go
T

30 lines
1004 B
Go
Raw Normal View History

2023-02-23 18:20:45 +08:00
package main
import (
2023-02-23 19:15:30 +08:00
"OpenIM/internal/task"
2023-02-23 19:41:44 +08:00
"OpenIM/pkg/common/config"
2023-02-23 18:20:45 +08:00
"flag"
"fmt"
"time"
)
func main() {
2023-02-24 17:42:01 +08:00
if err := config.InitConfig(); err != nil {
panic(err.Error())
}
2023-03-01 15:32:26 +08:00
// clear msg by id
var userIDClearMsg = flag.String("user_id_fix_seq", "", "userID to clear msg and reset seq")
var superGroupIDClearMsg = flag.String("super_group_id_fix_seq", "", "superGroupID to clear msg and reset seq")
// show seq by id
var userIDShowSeq = flag.String("user_id_show_seq", "", "show userID")
var superGroupIDShowSeq = flag.String("super_group_id_show_seq", "", "userID to clear msg and reset seq")
// fix seq by id
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")
2023-02-23 19:15:30 +08:00
var fixAllSeq = flag.Bool("fix_all_seq", false, "fix seq")
2023-03-01 15:32:26 +08:00
2023-02-23 18:20:45 +08:00
flag.Parse()
2023-03-01 15:32:26 +08:00
fmt.Println(time.Now(), "start cronTask", *userIDFixSeq, *superGroupIDFixSeq)
2023-02-23 19:15:30 +08:00
task.FixSeq(*userID, *superGroupID, *fixAllSeq)
2023-02-23 18:20:45 +08:00
}