diff options
author | James Moger <james.moger@gitblit.com> | 2013-11-18 22:31:37 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-11-29 11:05:46 -0500 |
commit | cacf8bff097fbb66a7be1bfe267b5da2605145f8 (patch) | |
tree | 7096df41b5944c569b1db24203eae8dcfa26ba04 /src/main/java/com/gitblit/MirrorExecutor.java | |
parent | 79cad53bba094cffa1d25581edbf4972a5158cd4 (diff) | |
download | gitblit-cacf8bff097fbb66a7be1bfe267b5da2605145f8.tar.gz gitblit-cacf8bff097fbb66a7be1bfe267b5da2605145f8.zip |
Use Dagger to inject managers into all filters and servlets
Change-Id: I9bb2cc0cbfac9841b13bed15a474fefb24355cd4
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;
|