Skip to content

Commit a61a47f

Browse files
authored
Update documentation to disable duration settings with -1 instead of 0 (#19647)
To turn off the notification endpoint polling, the value should be set to -1, not 0.
1 parent 9f5ddca commit a61a47f

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

custom/conf/app.example.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN_MODE = ; prod
6161
;; SSL Cipher Suites
6262
;SSL_CIPHER_SUITES=; Will default to "ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305" if aes is supported by hardware, otherwise chacha will be first.
6363
;;
64-
;; Timeout for any write to the connection. (Set to 0 to disable all timeouts.)
64+
;; Timeout for any write to the connection. (Set to -1 to disable all timeouts.)
6565
;PER_WRITE_TIMEOUT = 30s
6666
;;
6767
;; Timeout per Kb written to connections.
@@ -163,7 +163,7 @@ RUN_MODE = ; prod
163163
;; Enable exposure of SSH clone URL to anonymous visitors, default is false
164164
;SSH_EXPOSE_ANONYMOUS = false
165165
;;
166-
;; Timeout for any write to ssh connections. (Set to 0 to disable all timeouts.)
166+
;; Timeout for any write to ssh connections. (Set to -1 to disable all timeouts.)
167167
;; Will default to the PER_WRITE_TIMEOUT.
168168
;SSH_PER_WRITE_TIMEOUT = 30s
169169
;;
@@ -1178,7 +1178,7 @@ PATH =
11781178
;;
11791179
;; Control how often the notification endpoint is polled to update the notification
11801180
;; The timeout will increase to MAX_TIMEOUT in TIMEOUT_STEPs if the notification count is unchanged
1181-
;; Set MIN_TIMEOUT to 0 to turn off
1181+
;; Set MIN_TIMEOUT to -1 to turn off
11821182
;MIN_TIMEOUT = 10s
11831183
;MAX_TIMEOUT = 60s
11841184
;TIMEOUT_STEP = 10s
@@ -1263,7 +1263,7 @@ PATH =
12631263
;ISSUE_INDEXER_NAME = gitea_issues
12641264
;;
12651265
;; Timeout the indexer if it takes longer than this to start.
1266-
;; Set to zero to disable timeout.
1266+
;; Set to -1 to disable timeout.
12671267
;STARTUP_TIMEOUT = 30s
12681268
;;
12691269
;; Issue indexer queue, currently support: channel, levelqueue or redis, default is levelqueue (deprecated - use [queue.issue_indexer])
@@ -1582,7 +1582,7 @@ PATH =
15821582
;HOST =
15831583
;;
15841584
;; Time to keep items in cache if not used, default is 16 hours.
1585-
;; Setting it to 0 disables caching
1585+
;; Setting it to -1 disables caching
15861586
;ITEM_TTL = 16h
15871587

15881588
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1596,7 +1596,7 @@ PATH =
15961596
;ENABLED = true
15971597
;;
15981598
;; Time to keep items in cache if not used, default is 8760 hours.
1599-
;; Setting it to 0 disables caching
1599+
;; Setting it to -1 disables caching
16001600
;ITEM_TTL = 8760h
16011601
;;
16021602
;; Only enable the cache when repository's commits count great than

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
206206

207207
### UI - Notification (`ui.notification`)
208208

209-
- `MIN_TIMEOUT`: **10s**: These options control how often notification endpoint is polled to update the notification count. On page load the notification count will be checked after `MIN_TIMEOUT`. The timeout will increase to `MAX_TIMEOUT` by `TIMEOUT_STEP` if the notification count is unchanged. Set MIN_TIMEOUT to 0 to turn off.
209+
- `MIN_TIMEOUT`: **10s**: These options control how often notification endpoint is polled to update the notification count. On page load the notification count will be checked after `MIN_TIMEOUT`. The timeout will increase to `MAX_TIMEOUT` by `TIMEOUT_STEP` if the notification count is unchanged. Set MIN_TIMEOUT to -1 to turn off.
210210
- `MAX_TIMEOUT`: **60s**.
211211
- `TIMEOUT_STEP`: **10s**.
212212
- `EVENT_SOURCE_UPDATE_TIME`: **10s**: This setting determines how often the database is queried to update notification counts. If the browser client supports `EventSource` and `SharedWorker`, a `SharedWorker` will be used in preference to polling notification endpoint. Set to **-1** to disable the `EventSource`.
@@ -258,7 +258,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
258258
most cases you do not need to change the default value. Alter it only if
259259
your SSH server node is not the same as HTTP node. Do not set this variable
260260
if `PROTOCOL` is set to `http+unix`.
261-
- `PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the connection. (Set to 0 to
261+
- `PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the connection. (Set to -1 to
262262
disable all timeouts.)
263263
- `PER_WRITE_PER_KB_TIMEOUT`: **10s**: Timeout per Kb written to connections.
264264

@@ -287,7 +287,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
287287
- `SSH_KEYGEN_PATH`: **ssh-keygen**: Path to ssh-keygen, default is 'ssh-keygen' which means the shell is responsible for finding out which one to call.
288288
- `SSH_EXPOSE_ANONYMOUS`: **false**: Enable exposure of SSH clone URL to anonymous visitors, default is false.
289289
- `SSH_PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the SSH connections. (Set to
290-
0 to disable all timeouts.)
290+
-1 to disable all timeouts.)
291291
- `SSH_PER_WRITE_PER_KB_TIMEOUT`: **10s**: Timeout per Kb written to SSH connections.
292292
- `MINIMUM_KEY_SIZE_CHECK`: **true**: Indicate whether to check minimum key size with corresponding type.
293293

@@ -415,7 +415,7 @@ relation to port exhaustion.
415415
- `REPO_INDEXER_EXCLUDE_VENDORED`: **true**: Exclude vendored files from index.
416416
- `UPDATE_BUFFER_LEN`: **20**: Buffer length of index request. **DEPRECATED** use settings in `[queue.issue_indexer]`.
417417
- `MAX_FILE_SIZE`: **1048576**: Maximum size in bytes of files to be indexed.
418-
- `STARTUP_TIMEOUT`: **30s**: If the indexer takes longer than this timeout to start - fail. (This timeout will be added to the hammer time above for child processes - as bleve will not start until the previous parent is shutdown.) Set to zero to never timeout.
418+
- `STARTUP_TIMEOUT`: **30s**: If the indexer takes longer than this timeout to start - fail. (This timeout will be added to the hammer time above for child processes - as bleve will not start until the previous parent is shutdown.) Set to -1 to never timeout.
419419

420420
## Queue (`queue` and `queue.*`)
421421

@@ -687,12 +687,12 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
687687
- Redis: `redis://:[email protected]:6379/0?pool_size=100&idle_timeout=180s`
688688
- Memcache: `127.0.0.1:9090;127.0.0.1:9091`
689689
- TwoQueue LRU cache: `{"size":50000,"recent_ratio":0.25,"ghost_ratio":0.5}` or `50000` representing the maximum number of objects stored in the cache.
690-
- `ITEM_TTL`: **16h**: Time to keep items in cache if not used, Setting it to 0 disables caching.
690+
- `ITEM_TTL`: **16h**: Time to keep items in cache if not used, Setting it to -1 disables caching.
691691

692692
## Cache - LastCommitCache settings (`cache.last_commit`)
693693

694694
- `ENABLED`: **true**: Enable the cache.
695-
- `ITEM_TTL`: **8760h**: Time to keep items in cache if not used, Setting it to 0 disables caching.
695+
- `ITEM_TTL`: **8760h**: Time to keep items in cache if not used, Setting it to -1 disables caching.
696696
- `COMMITS_COUNT`: **1000**: Only enable the cache when repository's commits count great than.
697697

698698
## Session (`session`)

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ menu:
175175
- `HOST`: **\<empty\>**: 针对redis和memcache有效,主机地址和端口。
176176
- Redis: `network=tcp,addr=127.0.0.1:6379,password=macaron,db=0,pool_size=100,idle_timeout=180`
177177
- Memache: `127.0.0.1:9090;127.0.0.1:9091`
178-
- `ITEM_TTL`: **16h**: 缓存项目失效时间,设置为 0 则禁用缓存。
178+
- `ITEM_TTL`: **16h**: 缓存项目失效时间,设置为 -1 则禁用缓存。
179179

180180
## Cache - LastCommitCache settings (`cache.last_commit`)
181181

182182
- `ENABLED`: **true**: 是否启用。
183-
- `ITEM_TTL`: **8760h**: 缓存项目失效时间,设置为 0 则禁用缓存。
183+
- `ITEM_TTL`: **8760h**: 缓存项目失效时间,设置为 -1 则禁用缓存。
184184
- `COMMITS_COUNT`: **1000**: 仅当仓库的提交数大于时才启用缓存。
185185

186186
## Session (`session`)

0 commit comments

Comments
 (0)