summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/MirrorExecutor.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-11-18 22:31:37 -0500
committerJames Moger <james.moger@gitblit.com>2013-11-29 11:05:46 -0500
commitcacf8bff097fbb66a7be1bfe267b5da2605145f8 (patch)
tree7096df41b5944c569b1db24203eae8dcfa26ba04 /src/main/java/com/gitblit/MirrorExecutor.java
parent79cad53bba094cffa1d25581edbf4972a5158cd4 (diff)
downloadgitblit-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.java10
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;