Skip to content

Commit b86525d

Browse files
jmdjmd
jmd
authored and
jmd
committed
allow override of writer + adding forward of events.
1 parent 8e7dd8e commit b86525d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/DotJEM.Json.Index2.Management/IJsonIndexManager.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ public JsonIndexManager(
4545
IJsonDocumentSource jsonDocumentSource,
4646
IJsonIndexSnapshotManager snapshots,
4747
//TODO: Allow multiple indexes and something that can shard
48-
IJsonIndex index)
48+
IJsonIndex index,
49+
IJsonIndexWriter writer = null)
4950
{
5051
this.jsonDocumentSource = jsonDocumentSource;
5152
this.snapshots = snapshots;
5253
this.index = index;
53-
this.writer = new JsonIndexWriter(index);
54+
this.writer = writer ?? new JsonIndexWriter(index);
55+
this.writer.InfoStream.Subscribe(infoStream);
5456

5557
Tracker = new IngestProgressTracker();
5658
jsonDocumentSource.DocumentChanges.ForEachAsync(CaptureChange);

0 commit comments

Comments
 (0)