Quellcode durchsuchen

git pull 的超时时间设置为 60s

reghao vor 1 Jahr
Ursprung
Commit
31efe110ec

+ 2 - 1
web/src/main/java/cn/reghao/bnt/web/devops/build/tool/repo/GitImpl.java

@@ -74,7 +74,8 @@ public class GitImpl implements CodeUpdater {
             try (Repository repo = new FileRepository(localRepo.getAbsolutePath())) {
                 PullCommand gitPull = new Git(repo)
                         .pull()
-                        .setTimeout(600)
+                        // 超时 60s
+                        .setTimeout(60)
                         .setFastForward(MergeCommand.FastForwardMode.FF);
                 if (sshSessionFactory != null) {
                     gitPull.setTransportConfigCallback(transport -> {