From 14d96ff7acacf8912b05f113b8ca35f67edebd1b Mon Sep 17 00:00:00 2001 From: Paweł Bogusławski Date: Sat, 4 Jun 2022 13:42:17 +0200 Subject: Disable unnecessary mirroring elements (#18527) * Disable unnecessary mirroring elements This mod fixes disabling unnecessary mirroring elements. Related: https://github.com/go-gitea/gitea/pull/16957 Related: https://github.com/go-gitea/gitea/pull/13084 Author-Change-Id: IB#1105104 * Checkbox rendering disabled instead of hiding it Fixes: 02b45051503d4330da9757ff084c9cc5e6e60d84 Related: https://github.com/go-gitea/gitea/pull/18527#pullrequestreview-878061913 Author-Change-Id: IB#1105104 * Update custom/conf/app.example.ini Co-authored-by: silverwind * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-authored-by: silverwind * Mirror filter removed only when whole mirroring feature is disabled Fixes: 02b45051503d4330da9757ff084c9cc5e6e60d84 Related: https://github.com/go-gitea/gitea/pull/18527#discussion_r883268890 Author-Change-Id: IB#1105104 Co-authored-by: silverwind --- services/cron/tasks_basic.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'services') diff --git a/services/cron/tasks_basic.go b/services/cron/tasks_basic.go index 6f3fcb42c3..39fda34ea2 100644 --- a/services/cron/tasks_basic.go +++ b/services/cron/tasks_basic.go @@ -155,7 +155,9 @@ func registerCleanupPackages() { } func initBasicTasks() { - registerUpdateMirrorTask() + if setting.Mirror.Enabled { + registerUpdateMirrorTask() + } registerRepoHealthCheck() registerCheckRepoStats() registerArchiveCleanup() -- cgit v1.2.3