From 3ba244f99b4af668f814b9829e6c9a34019b96aa Mon Sep 17 00:00:00 2001 From: Jerry Jacobs Date: Thu, 18 Apr 2024 07:42:48 +0200 Subject: [PATCH 1/4] Fixup app.example.ini for task section, which is now queue.task --- custom/conf/app.example.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 32b51fd7c63b..63d4b6e6b947 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -2379,19 +2379,19 @@ LEVEL = Info ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;[task] +;[queue.task] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Task queue type, could be `channel` or `redis`. -;QUEUE_TYPE = channel +;TYPE = channel ;; ;; Task queue length, available only when `QUEUE_TYPE` is `channel`. -;QUEUE_LENGTH = 1000 +;LENGTH = 1000 ;; ;; Task queue connection string, available only when `QUEUE_TYPE` is `redis`. ;; If there is a password of redis, use `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` or `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` for `redis-clsuter`. -;QUEUE_CONN_STR = "redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s" +;CONN_STR = "redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From 78be128446c495fe448916b6894eede40e4b1d92 Mon Sep 17 00:00:00 2001 From: Jerry Jacobs Date: Thu, 18 Apr 2024 13:09:18 +0200 Subject: [PATCH 2/4] custom/conf/app.example.ini: Remove queue section docs/content/administration/config-cheat-sheet.en-us.md: Remove task section --- custom/conf/app.example.ini | 38 ------------------- .../config-cheat-sheet.en-us.md | 8 ---- 2 files changed, 46 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 63d4b6e6b947..38c4c66603ac 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -1431,44 +1431,6 @@ LEVEL = Info ;; ;MAX_FILE_SIZE = 1048576 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;[queue] -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Specific queues can be individually configured with [queue.name]. [queue] provides defaults -;; ([queue.issue_indexer] is special due to the old configuration described above) -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; General queue queue type, currently support: persistable-channel, channel, level, redis, dummy -;; default to persistable-channel -;TYPE = persistable-channel -;; -;; data-dir for storing persistable queues and level queues, individual queues will default to `queues/common` meaning the queue is shared. -;DATADIR = queues/ ; Relative paths will be made absolute against `%(APP_DATA_PATH)s`. -;; -;; Default queue length before a channel queue will block -;LENGTH = 100000 -;; -;; Batch size to send for batched queues -;BATCH_LENGTH = 20 -;; -;; Connection string for redis queues this will store the redis or redis-cluster connection string. -;; When `TYPE` is `persistable-channel`, this provides a directory for the underlying leveldb -;; or additional options of the form `leveldb://path/to/db?option=value&....`, and will override `DATADIR`. -;CONN_STR = "redis://127.0.0.1:6379/0" -;; -;; Provides the suffix of the default redis/disk queue name - specific queues can be overridden within in their [queue.name] sections. -;QUEUE_NAME = "_queue" -;; -;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections. -;SET_NAME = "_unique" -;; -;; Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10. -;MAX_WORKERS = ; (dynamic) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;[admin] diff --git a/docs/content/administration/config-cheat-sheet.en-us.md b/docs/content/administration/config-cheat-sheet.en-us.md index ff8bcb066c41..9328177f5024 100644 --- a/docs/content/administration/config-cheat-sheet.en-us.md +++ b/docs/content/administration/config-cheat-sheet.en-us.md @@ -1198,14 +1198,6 @@ in this mapping or the filetype using heuristics. - `DEFAULT_UI_LOCATION`: Default location of time on the UI, so that we can display correct user's time on UI. i.e. Asia/Shanghai -## Task (`task`) - -Task queue configuration has been moved to `queue.task`. However, the below configuration values are kept for backwards compatibility: - -- `QUEUE_TYPE`: **channel**: Task queue type, could be `channel` or `redis`. -- `QUEUE_LENGTH`: **1000**: Task queue length, available only when `QUEUE_TYPE` is `channel`. -- `QUEUE_CONN_STR`: **redis://127.0.0.1:6379/0**: Task queue connection string, available only when `QUEUE_TYPE` is `redis`. If redis needs a password, use `redis://123@127.0.0.1:6379/0` or `redis+cluster://123@127.0.0.1:6379/0`. - ## Migrations (`migrations`) - `MAX_ATTEMPTS`: **3**: Max attempts per http/https request on migrations. From 5a28ca0db70972a978a84a899a6157a18f283453 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 18 Apr 2024 19:13:44 +0800 Subject: [PATCH 3/4] Update app.example.ini --- custom/conf/app.example.ini | 54 ++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 38c4c66603ac..b4e330184edc 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -1431,6 +1431,44 @@ LEVEL = Info ;; ;MAX_FILE_SIZE = 1048576 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[queue] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Specific queues can be individually configured with [queue.name]. [queue] provides defaults +;; ([queue.issue_indexer] is special due to the old configuration described above) +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; General queue queue type, currently support: persistable-channel, channel, level, redis, dummy +;; default to persistable-channel +;TYPE = persistable-channel +;; +;; data-dir for storing persistable queues and level queues, individual queues will default to `queues/common` meaning the queue is shared. +;DATADIR = queues/ ; Relative paths will be made absolute against `%(APP_DATA_PATH)s`. +;; +;; Default queue length before a channel queue will block +;LENGTH = 100000 +;; +;; Batch size to send for batched queues +;BATCH_LENGTH = 20 +;; +;; Connection string for redis queues this will store the redis or redis-cluster connection string. +;; When `TYPE` is `persistable-channel`, this provides a directory for the underlying leveldb +;; or additional options of the form `leveldb://path/to/db?option=value&....`, and will override `DATADIR`. +;CONN_STR = "redis://127.0.0.1:6379/0" +;; +;; Provides the suffix of the default redis/disk queue name - specific queues can be overridden within in their [queue.name] sections. +;QUEUE_NAME = "_queue" +;; +;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections. +;SET_NAME = "_unique" +;; +;; Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10. +;MAX_WORKERS = ; (dynamic) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;[admin] @@ -2339,22 +2377,6 @@ LEVEL = Info ;; Enable issue by repository metrics; default is false ;ENABLED_ISSUE_BY_REPOSITORY = false -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;[queue.task] -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Task queue type, could be `channel` or `redis`. -;TYPE = channel -;; -;; Task queue length, available only when `QUEUE_TYPE` is `channel`. -;LENGTH = 1000 -;; -;; Task queue connection string, available only when `QUEUE_TYPE` is `redis`. -;; If there is a password of redis, use `redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` or `redis+cluster://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` for `redis-clsuter`. -;CONN_STR = "redis://127.0.0.1:6379/0?pool_size=100&idle_timeout=180s" - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;[migrations] From bed6e9f1c41c37f9495552e99328af295c480e98 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 18 Apr 2024 19:14:39 +0800 Subject: [PATCH 4/4] Update config-cheat-sheet.zh-cn.md --- docs/content/administration/config-cheat-sheet.zh-cn.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/content/administration/config-cheat-sheet.zh-cn.md b/docs/content/administration/config-cheat-sheet.zh-cn.md index 759f39b57691..e4945dd1c1dd 100644 --- a/docs/content/administration/config-cheat-sheet.zh-cn.md +++ b/docs/content/administration/config-cheat-sheet.zh-cn.md @@ -1128,15 +1128,6 @@ ALLOW_DATA_URI_IMAGES = true - `DEFAULT_UI_LOCATION`:在 UI 上的默认时间位置,以便我们可以在 UI 上显示正确的用户时间。例如:Asia/Shanghai -## 任务 (`task`) - -任务队列配置已移动到 `queue.task`。然而,以下配置值仍保留以确保向后兼容: - -- `QUEUE_TYPE`:**channel**:任务队列类型,可以是 `channel` 或 `redis`。 -- `QUEUE_LENGTH`:**1000**:任务队列长度,仅在 `QUEUE_TYPE` 为 `channel` 时可用。 -- `QUEUE_CONN_STR`:**redis://127.0.0.1:6379/0**:任务队列连接字符串,仅在 `QUEUE_TYPE` 为 `redis` 时可用。 - 如果 redis 需要密码,使用 `redis://123@127.0.0.1:6379/0` 或 `redis+cluster://123@127.0.0.1:6379/0`。 - ## 迁移 (`migrations`) - `MAX_ATTEMPTS`:**3**:每次 http/https 请求的最大尝试次数(用于迁移)。