summaryrefslogtreecommitdiffstats
path: root/mattermost.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-01-20 08:07:52 -0600
committer=Corey Hulen <corey@hulen.com>2016-01-20 08:07:52 -0600
commitca33812cb5b83dba0babc244fdf101c78abc046a (patch)
tree9e78c608c77c5f97d53190e3a291efaebc05be44 /mattermost.go
parentf5eb3c1bcb0c7e367f64bd8e5a0d2d5418f8e2ef (diff)
downloadchat-ca33812cb5b83dba0babc244fdf101c78abc046a.tar.gz
chat-ca33812cb5b83dba0babc244fdf101c78abc046a.tar.bz2
chat-ca33812cb5b83dba0babc244fdf101c78abc046a.zip
PLT-7 adding loc db calls for system table
Diffstat (limited to 'mattermost.go')
-rw-r--r--mattermost.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/mattermost.go b/mattermost.go
index 4b0d5d0ad..7e5dae4b0 100644
--- a/mattermost.go
+++ b/mattermost.go
@@ -92,14 +92,14 @@ func main() {
}
func setDiagnosticId() {
- if result := <-api.Srv.Store.System().Get(); result.Err == nil {
+ if result := <-api.Srv.Store.System().Get(utils.T); result.Err == nil {
props := result.Data.(model.StringMap)
id := props[model.SYSTEM_DIAGNOSTIC_ID]
if len(id) == 0 {
id = model.NewId()
systemId := &model.System{Name: model.SYSTEM_DIAGNOSTIC_ID, Value: id}
- <-api.Srv.Store.System().Save(systemId)
+ <-api.Srv.Store.System().Save(utils.T, systemId)
}
utils.CfgDiagnosticId = id
@@ -110,7 +110,7 @@ func runSecurityAndDiagnosticsJobAndForget() {
go func() {
for {
if *utils.Cfg.ServiceSettings.EnableSecurityFixAlert {
- if result := <-api.Srv.Store.System().Get(); result.Err == nil {
+ if result := <-api.Srv.Store.System().Get(utils.T); result.Err == nil {
props := result.Data.(model.StringMap)
lastSecurityTime, _ := strconv.ParseInt(props[model.SYSTEM_LAST_SECURITY_TIME], 10, 0)
currentTime := model.GetMillis()
@@ -135,9 +135,9 @@ func runSecurityAndDiagnosticsJobAndForget() {
systemSecurityLastTime := &model.System{Name: model.SYSTEM_LAST_SECURITY_TIME, Value: strconv.FormatInt(currentTime, 10)}
if lastSecurityTime == 0 {
- <-api.Srv.Store.System().Save(systemSecurityLastTime)
+ <-api.Srv.Store.System().Save(utils.T, systemSecurityLastTime)
} else {
- <-api.Srv.Store.System().Update(systemSecurityLastTime)
+ <-api.Srv.Store.System().Update(utils.T, systemSecurityLastTime)
}
if ucr := <-api.Srv.Store.User().GetTotalUsersCount(); ucr.Err == nil {
@@ -185,7 +185,7 @@ func runSecurityAndDiagnosticsJobAndForget() {
}
bulletinSeen := &model.System{Name: "SecurityBulletin_" + bulletin.Id, Value: bulletin.Id}
- <-api.Srv.Store.System().Save(bulletinSeen)
+ <-api.Srv.Store.System().Save(utils.T, bulletinSeen)
}
}
}