fix: enable LOG_COMPRESSION by default

Refs: https://codeberg.org/forgejo/forgejo/pulls/4924#issuecomment-2165839
This commit is contained in:
Earl Warren 2024-08-11 14:16:48 +02:00
parent d42f28de4e
commit 03b9d50c67
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 3 additions and 3 deletions

View file

@ -2717,7 +2717,7 @@ LEVEL = Info
;; It's always recommended to use compression when using local disk as log storage if CPU or memory is not a bottleneck.
;; And for object storage services like S3, which is billed for requests, it would cause extra 2 times of get requests for each log view.
;; But it will save storage space and network bandwidth, so it's still recommended to use compression.
;LOG_COMPRESSION = none
;LOG_COMPRESSION = zstd
;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
;ARTIFACT_RETENTION_DAYS = 90
;; Timeout to stop the task which have running status, but haven't been updated for a long time

View file

@ -58,11 +58,11 @@ func (c logCompression) IsValid() bool {
}
func (c logCompression) IsNone() bool {
return c == "" || strings.ToLower(string(c)) == "none"
return strings.ToLower(string(c)) == "none"
}
func (c logCompression) IsZstd() bool {
return strings.ToLower(string(c)) == "zstd"
return c == "" || strings.ToLower(string(c)) == "zstd"
}
func loadActionsFrom(rootCfg ConfigProvider) error {