From 8aede14b1d621cefa520c7bf6c838c866e1fabab Mon Sep 17 00:00:00 2001
From: Zettat123 <zettat123@gmail.com>
Date: Fri, 14 Feb 2025 23:13:56 +0800
Subject: [PATCH] Use default Git timeout when checking repo health (#33593)

---
 services/cron/tasks_basic.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/services/cron/tasks_basic.go b/services/cron/tasks_basic.go
index fb5938745e6..841981787df 100644
--- a/services/cron/tasks_basic.go
+++ b/services/cron/tasks_basic.go
@@ -54,7 +54,7 @@ func registerRepoHealthCheck() {
 			RunAtStart: false,
 			Schedule:   "@midnight",
 		},
-		Timeout: 60 * time.Second,
+		Timeout: time.Duration(setting.Git.Timeout.Default) * time.Second,
 		Args:    []string{},
 	}, func(ctx context.Context, _ *user_model.User, config Config) error {
 		rhcConfig := config.(*RepoHealthCheckConfig)