diff options
Diffstat (limited to 'store')
-rw-r--r-- | store/sql_channel_store.go | 11 | ||||
-rw-r--r-- | store/store.go | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go index cf34f2847..d503d2225 100644 --- a/store/sql_channel_store.go +++ b/store/sql_channel_store.go @@ -153,7 +153,16 @@ func (s SqlChannelStore) extraUpdated(channel *model.Channel) StoreChannel { channel.ExtraUpdated() - if count, err := s.GetMaster().Update(channel); err != nil || count != 1 { + _, err := s.GetMaster().Exec( + `UPDATE + Channels + SET + ExtraUpdateAt = :Time + WHERE + Id = :Id`, + map[string]interface{}{"Id": channel.Id, "Time": channel.ExtraUpdateAt}) + + if err != nil { result.Err = model.NewAppError("SqlChannelStore.extraUpdated", "Problem updating members last updated time", "id="+channel.Id+", "+err.Error()) } diff --git a/store/store.go b/store/store.go index 617ea7f2b..8dbf12b55 100644 --- a/store/store.go +++ b/store/store.go @@ -4,7 +4,9 @@ package store import ( + l4g "code.google.com/p/log4go" "github.com/mattermost/platform/model" + "time" ) type StoreResult struct { @@ -17,6 +19,8 @@ type StoreChannel chan StoreResult func Must(sc StoreChannel) interface{} { r := <-sc if r.Err != nil { + l4g.Close() + time.Sleep(time.Second) panic(r.Err) } |