diff options
author | =Corey Hulen <corey@hulen.com> | 2015-07-14 15:12:04 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-07-14 15:12:04 -0800 |
commit | 246d12aaf23fa3a2c23225b33a333effff76253b (patch) | |
tree | c2a19c301b34391427e60e0e5cfcbf9879a44ee7 /api/web_team_hub.go | |
parent | a45dea6b06bb62b3fb953d598854c371f417082d (diff) | |
download | chat-246d12aaf23fa3a2c23225b33a333effff76253b.tar.gz chat-246d12aaf23fa3a2c23225b33a333effff76253b.tar.bz2 chat-246d12aaf23fa3a2c23225b33a333effff76253b.zip |
fixes mm-1348 removing dependency on redis
Diffstat (limited to 'api/web_team_hub.go')
-rw-r--r-- | api/web_team_hub.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/api/web_team_hub.go b/api/web_team_hub.go index 7c7981e76..7a63b84d1 100644 --- a/api/web_team_hub.go +++ b/api/web_team_hub.go @@ -6,8 +6,6 @@ package api import ( l4g "code.google.com/p/log4go" "github.com/mattermost/platform/model" - "github.com/mattermost/platform/store" - "strings" ) type TeamHub struct { @@ -43,43 +41,6 @@ func (h *TeamHub) Stop() { } func (h *TeamHub) Start() { - - pubsub := store.RedisClient().PubSub() - - go func() { - defer func() { - l4g.Debug("redis reader finished for teamId=%v", h.teamId) - hub.Stop(h.teamId) - }() - - l4g.Debug("redis reader starting for teamId=%v", h.teamId) - - err := pubsub.Subscribe(h.teamId) - if err != nil { - l4g.Error("Error while subscribing to redis %v %v", h.teamId, err) - return - } - - for { - if payload, err := pubsub.ReceiveTimeout(REDIS_WAIT); err != nil { - if strings.Contains(err.Error(), "i/o timeout") { - if len(h.connections) == 0 { - l4g.Debug("No active connections so sending stop %v", h.teamId) - return - } - } else { - return - } - } else { - msg := store.GetMessageFromPayload(payload) - if msg != nil { - h.broadcast <- msg - } - } - } - - }() - go func() { for { select { @@ -110,7 +71,6 @@ func (h *TeamHub) Start() { webCon.WebSocket.Close() } - pubsub.Close() return } } |