diff options
Diffstat (limited to 'src/main/java/com/gitblit/MirrorExecutor.java')
-rw-r--r-- | src/main/java/com/gitblit/MirrorExecutor.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/MirrorExecutor.java b/src/main/java/com/gitblit/MirrorExecutor.java index a96c955f..6c951b94 100644 --- a/src/main/java/com/gitblit/MirrorExecutor.java +++ b/src/main/java/com/gitblit/MirrorExecutor.java @@ -52,14 +52,20 @@ public class MirrorExecutor implements Runnable { private final IStoredSettings settings;
+ private final IRepositoryManager repositoryManager;
+
private AtomicBoolean running = new AtomicBoolean(false);
private AtomicBoolean forceClose = new AtomicBoolean(false);
private final UserModel gitblitUser;
- public MirrorExecutor(IStoredSettings settings) {
+ public MirrorExecutor(
+ IStoredSettings settings,
+ IRepositoryManager repositoryManager) {
+
this.settings = settings;
+ this.repositoryManager = repositoryManager;
this.gitblitUser = new UserModel("gitblit");
this.gitblitUser.displayName = "Gitblit";
}
@@ -84,8 +90,6 @@ public class MirrorExecutor implements Runnable { running.set(true);
- IRepositoryManager repositoryManager = GitBlit.getManager(IRepositoryManager.class);
-
for (String repositoryName : repositoryManager.getRepositoryList()) {
if (forceClose.get()) {
break;
|