From cbc55dce69fd07e7c11c126d6990672a4b162ac5 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Wed, 15 Jan 2020 18:12:44 -0500 Subject: [PATCH] install ssh key if requested, even for fork --- .../bubble/service/dbfilter/DatabaseFilterService.java | 2 +- .../java/bubble/service/dbfilter/FullEntityIterator.java | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bubble-server/src/main/java/bubble/service/dbfilter/DatabaseFilterService.java b/bubble-server/src/main/java/bubble/service/dbfilter/DatabaseFilterService.java index a50eef0c..32fb708d 100644 --- a/bubble-server/src/main/java/bubble/service/dbfilter/DatabaseFilterService.java +++ b/bubble-server/src/main/java/bubble/service/dbfilter/DatabaseFilterService.java @@ -98,7 +98,7 @@ public class DatabaseFilterService { @Override public RekeyOptions getOptions() { return readerOptions; } @Override protected Iterator getEntityProducer(BubbleConfiguration fromConfig, AtomicReference error) { return fork - ? new FullEntityIterator(configuration, readerError) + ? new FullEntityIterator(configuration, network, readerError) : new FilteredEntityIterator(configuration, account, network, node, readerError); } }.runInBackground(readerError::set); diff --git a/bubble-server/src/main/java/bubble/service/dbfilter/FullEntityIterator.java b/bubble-server/src/main/java/bubble/service/dbfilter/FullEntityIterator.java index be16b019..268824ff 100644 --- a/bubble-server/src/main/java/bubble/service/dbfilter/FullEntityIterator.java +++ b/bubble-server/src/main/java/bubble/service/dbfilter/FullEntityIterator.java @@ -1,5 +1,6 @@ package bubble.service.dbfilter; +import bubble.model.cloud.BubbleNetwork; import bubble.server.BubbleConfiguration; import lombok.extern.slf4j.Slf4j; @@ -9,15 +10,19 @@ import java.util.concurrent.atomic.AtomicReference; public class FullEntityIterator extends EntityIterator { private final BubbleConfiguration config; + private final BubbleNetwork network; - public FullEntityIterator (BubbleConfiguration config, AtomicReference error) { + public FullEntityIterator (BubbleConfiguration config, + BubbleNetwork network, + AtomicReference error) { super(error); this.config = config; + this.network = network; } protected void iterate() { config.getEntityClasses().forEach(c -> { - addEntities(c, config.getDaoForEntityClass(c).findAll(), null, null); + addEntities(c, config.getDaoForEntityClass(c).findAll(), network, null); }); log.info("iterate: completed"); }