summaryrefslogtreecommitdiffstats
path: root/modules/setting/queue.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-10-04 18:12:26 +0100
committerGitHub <noreply@github.com>2020-10-04 18:12:26 +0100
commit3f3a4f5b4191d315da083fb975a74a985730e459 (patch)
treee0e0bb980c328ccb7937358334b88491cc62bc2a /modules/setting/queue.go
parent72636fd6642fcae6e7447dd499cb097c5c65ab32 (diff)
downloadgitea-3f3a4f5b4191d315da083fb975a74a985730e459.tar.gz
gitea-3f3a4f5b4191d315da083fb975a74a985730e459.zip
Avoid setitng the CONN_STR in queues unless it is meant to be set (#13025)
Since the move to common leveldb and common redis the disk queue code will check the connection string before defaulting to the DATADIR. Therefore we should ensure that the connection string is kept empty unless it is actually set. Fix #13023 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/setting/queue.go')
-rw-r--r--modules/setting/queue.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/setting/queue.go b/modules/setting/queue.go
index 8bdca1017f..fc43978610 100644
--- a/modules/setting/queue.go
+++ b/modules/setting/queue.go
@@ -6,7 +6,6 @@ package setting
import (
"fmt"
- "path"
"path/filepath"
"strconv"
"strings"
@@ -94,7 +93,7 @@ func NewQueueService() {
}
Queue.Length = sec.Key("LENGTH").MustInt(20)
Queue.BatchLength = sec.Key("BATCH_LENGTH").MustInt(20)
- Queue.ConnectionString = sec.Key("CONN_STR").MustString(path.Join(AppDataPath, ""))
+ Queue.ConnectionString = sec.Key("CONN_STR").MustString("")
Queue.Type = sec.Key("TYPE").MustString("persistable-channel")
Queue.Network, Queue.Addresses, Queue.Password, Queue.DBIndex, _ = ParseQueueConnStr(Queue.ConnectionString)
Queue.WrapIfNecessary = sec.Key("WRAP_IF_NECESSARY").MustBool(true)