summaryrefslogtreecommitdiffstats
path: root/modules/setting/task.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-02-21 06:18:26 +0800
committerGitHub <noreply@github.com>2023-02-20 16:18:26 -0600
commitd845be661f5205b70d4fa6883e7912a5d2491218 (patch)
tree2c946a94512cdac7557d4a942acf0377efa583e4 /modules/setting/task.go
parentd2128b44f714fcaacdc88865e62f6f9dd8216577 (diff)
downloadgitea-d845be661f5205b70d4fa6883e7912a5d2491218.tar.gz
gitea-d845be661f5205b70d4fa6883e7912a5d2491218.zip
handle deprecated settings (#22992)
Fix #22736
Diffstat (limited to 'modules/setting/task.go')
-rw-r--r--modules/setting/task.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/setting/task.go b/modules/setting/task.go
index 81732deeb6..f75b4f1481 100644
--- a/modules/setting/task.go
+++ b/modules/setting/task.go
@@ -3,15 +3,16 @@
package setting
-// FIXME: DEPRECATED to be removed in v1.18.0
+// DEPRECATED should not be removed because users maybe upgrade from lower version to the latest version
+// if these are removed, the warning will not be shown
// - will need to set default for [queue.task] LENGTH to 1000 though
func loadTaskFrom(rootCfg ConfigProvider) {
taskSec := rootCfg.Section("task")
queueTaskSec := rootCfg.Section("queue.task")
- deprecatedSetting(rootCfg, "task", "QUEUE_TYPE", "queue.task", "TYPE")
- deprecatedSetting(rootCfg, "task", "QUEUE_CONN_STR", "queue.task", "CONN_STR")
- deprecatedSetting(rootCfg, "task", "QUEUE_LENGTH", "queue.task", "LENGTH")
+ deprecatedSetting(rootCfg, "task", "QUEUE_TYPE", "queue.task", "TYPE", "v1.19.0")
+ deprecatedSetting(rootCfg, "task", "QUEUE_CONN_STR", "queue.task", "CONN_STR", "v1.19.0")
+ deprecatedSetting(rootCfg, "task", "QUEUE_LENGTH", "queue.task", "LENGTH", "v1.19.0")
switch taskSec.Key("QUEUE_TYPE").MustString("channel") {
case "channel":