diff --git a/def.go b/def.go index c27b541..805f66d 100644 --- a/def.go +++ b/def.go @@ -80,6 +80,7 @@ type MQClient struct { type ChirpClient struct { HeartBeat time.Time `json:"heart_beat"` Login string `json:"nickname"` + Build string `json:"build"` Active bool `json:"active"` TGUserID64 int64 `json:"tg_user_id"` MQ MQClient `json:"mq"` @@ -100,6 +101,7 @@ type MQKeepAlive struct { Nickname string `json:"nick"` Queue string `json:"queue"` Date time.Time `json:"date"` + Build string `json:"build"` } type TGCommand struct { diff --git a/main.go b/main.go index ad67a3f..4e3a9b5 100644 --- a/main.go +++ b/main.go @@ -115,7 +115,7 @@ func main() { u := tb.User{ ID: int(cfg.Bot.Admin), } - bot.Send(&u, fmt.Sprintf("Bot restarted (%s)", githash)) + bot.Send(&u, fmt.Sprintf("Started (%s - %s)", githash, buildstamp)) cr = startCron() diff --git a/workers.go b/workers.go index 42d7ea4..d3c6656 100644 --- a/workers.go +++ b/workers.go @@ -165,6 +165,7 @@ func MQKeepAliveWorker() { // outdated keep-alive coming from client } else if clt, ok := getLockedClient(x.TGUserID64, true); ok { clt.HeartBeat = x.Date + clt.Build = x.Build if clt.Active { //log.Printf("MQKeepAliveWorker : Client %s (%d) already active.\n", clt.Login, clt.TGUserID64) clt.Mux.Unlock()