update with version

This commit is contained in:
shoopea 2020-02-05 18:42:19 +08:00
parent 007f9e4c76
commit 64b0b7fe52
3 changed files with 3 additions and 0 deletions

1
def.go
View File

@ -43,6 +43,7 @@ type MQKeepAlive struct {
Nickname string `json:"nick"` Nickname string `json:"nick"`
Queue string `json:"queue"` Queue string `json:"queue"`
Date time.Time `json:"date"` Date time.Time `json:"date"`
Build string `json:"build"`
} }
const ( const (

View File

@ -32,6 +32,7 @@ var (
history = flag.Bool("history", false, "initialize chat history") history = flag.Bool("history", false, "initialize chat history")
historyChatID64 = flag.Int64("chat_id", 0, "chat to historize") historyChatID64 = flag.Int64("chat_id", 0, "chat to historize")
historySenderUserID64 = flag.Int64("sender_user_id", 0, "sender_user_id to historize") historySenderUserID64 = flag.Int64("sender_user_id", 0, "sender_user_id to historize")
githash = "unknown"
cfg Config cfg Config

1
mq.go
View File

@ -120,6 +120,7 @@ func MQKeepAliveWorker() {
Nickname: cfg.Rabbit.User, Nickname: cfg.Rabbit.User,
Queue: cfg.Rabbit.ReceiveQueue, Queue: cfg.Rabbit.ReceiveQueue,
Date: t, Date: t,
Build: githash,
} }
b, err := json.Marshal(m) b, err := json.Marshal(m)
if err != nil { if err != nil {