mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Revert " PLT-7 adding loc for db calls"
This commit is contained in:
@@ -6,7 +6,6 @@ package store
|
||||
import (
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/platform/model"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
)
|
||||
|
||||
type SqlSessionStore struct {
|
||||
@@ -38,7 +37,7 @@ func (me SqlSessionStore) CreateIndexesIfNotExists() {
|
||||
me.CreateIndexIfNotExists("idx_sessions_token", "Sessions", "Token")
|
||||
}
|
||||
|
||||
func (me SqlSessionStore) Save(T goi18n.TranslateFunc, session *model.Session) StoreChannel {
|
||||
func (me SqlSessionStore) Save(session *model.Session) StoreChannel {
|
||||
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
@@ -54,7 +53,7 @@ func (me SqlSessionStore) Save(T goi18n.TranslateFunc, session *model.Session) S
|
||||
|
||||
session.PreSave()
|
||||
|
||||
if cur := <-me.CleanUpExpiredSessions(T, session.UserId); cur.Err != nil {
|
||||
if cur := <-me.CleanUpExpiredSessions(session.UserId); cur.Err != nil {
|
||||
l4g.Error("Failed to cleanup sessions in Save err=%v", cur.Err)
|
||||
}
|
||||
|
||||
@@ -71,7 +70,7 @@ func (me SqlSessionStore) Save(T goi18n.TranslateFunc, session *model.Session) S
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (me SqlSessionStore) Get(T goi18n.TranslateFunc, sessionIdOrToken string) StoreChannel {
|
||||
func (me SqlSessionStore) Get(sessionIdOrToken string) StoreChannel {
|
||||
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
@@ -96,12 +95,12 @@ func (me SqlSessionStore) Get(T goi18n.TranslateFunc, sessionIdOrToken string) S
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (me SqlSessionStore) GetSessions(T goi18n.TranslateFunc, userId string) StoreChannel {
|
||||
func (me SqlSessionStore) GetSessions(userId string) StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
go func() {
|
||||
|
||||
if cur := <-me.CleanUpExpiredSessions(T, userId); cur.Err != nil {
|
||||
if cur := <-me.CleanUpExpiredSessions(userId); cur.Err != nil {
|
||||
l4g.Error("Failed to cleanup sessions in getSessions err=%v", cur.Err)
|
||||
}
|
||||
|
||||
@@ -123,7 +122,7 @@ func (me SqlSessionStore) GetSessions(T goi18n.TranslateFunc, userId string) Sto
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (me SqlSessionStore) Remove(T goi18n.TranslateFunc, sessionIdOrToken string) StoreChannel {
|
||||
func (me SqlSessionStore) Remove(sessionIdOrToken string) StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
go func() {
|
||||
@@ -141,7 +140,7 @@ func (me SqlSessionStore) Remove(T goi18n.TranslateFunc, sessionIdOrToken string
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (me SqlSessionStore) RemoveAllSessionsForTeam(T goi18n.TranslateFunc, teamId string) StoreChannel {
|
||||
func (me SqlSessionStore) RemoveAllSessionsForTeam(teamId string) StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
go func() {
|
||||
@@ -159,7 +158,7 @@ func (me SqlSessionStore) RemoveAllSessionsForTeam(T goi18n.TranslateFunc, teamI
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (me SqlSessionStore) PermanentDeleteSessionsByUser(T goi18n.TranslateFunc, userId string) StoreChannel {
|
||||
func (me SqlSessionStore) PermanentDeleteSessionsByUser(userId string) StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
go func() {
|
||||
@@ -177,7 +176,7 @@ func (me SqlSessionStore) PermanentDeleteSessionsByUser(T goi18n.TranslateFunc,
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (me SqlSessionStore) CleanUpExpiredSessions(T goi18n.TranslateFunc, userId string) StoreChannel {
|
||||
func (me SqlSessionStore) CleanUpExpiredSessions(userId string) StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
go func() {
|
||||
@@ -196,7 +195,7 @@ func (me SqlSessionStore) CleanUpExpiredSessions(T goi18n.TranslateFunc, userId
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (me SqlSessionStore) UpdateLastActivityAt(T goi18n.TranslateFunc, sessionId string, time int64) StoreChannel {
|
||||
func (me SqlSessionStore) UpdateLastActivityAt(sessionId string, time int64) StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
go func() {
|
||||
@@ -215,7 +214,7 @@ func (me SqlSessionStore) UpdateLastActivityAt(T goi18n.TranslateFunc, sessionId
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (me SqlSessionStore) UpdateRoles(T goi18n.TranslateFunc, userId, roles string) StoreChannel {
|
||||
func (me SqlSessionStore) UpdateRoles(userId, roles string) StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user