Skip to content

Commit cc26351

Browse files
committed
EventFilter -> CreateEventFilter
1 parent 42ab64e commit cc26351

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/Propulsion/Propulsion.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<TargetFramework>net6.0</TargetFramework>
77
<!-- NOTE FSharp.Core dep is implies by what `FSharp.Control.TaskSeq` dictates; see below -->
88
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
9-
<PackageValidationBaselineVersion>3.0.0-rc.14.3</PackageValidationBaselineVersion>
9+
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14.3</PackageValidationBaselineVersion>-->
1010
</PropertyGroup>
1111

1212
<ItemGroup>

src/Propulsion/StreamFilter.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ type StreamFilter([<Optional>] allowCats, [<Optional>] denyCats, [<Optional>] al
3636
let denyCats = if includeSystem_ then denyCats else Array.append denyCats [| "^\$" |]
3737
let allowSns, denySns = match allowSns, denySns with [||], [||] -> [|".*"|], [||] | x -> x
3838
let allowEts, denyEts = match allowEts, denyEts with [||], [||] -> [|".*"|], [||] | x -> x
39-
log.Value.Information("Categories ☑️ {@allowCats} 🚫{@denyCats} Streams ☑️ {@allowStreams} 🚫{denyStreams} Events ☑️ {allowEts} 🚫{@denyEts}",
39+
log.Value.Information("Categories {@allowCats} 🚫{@denyCats} Streams {@allowStreams} 🚫{denyStreams} Events {allowEts} 🚫{@denyEts}",
4040
asRe allowCats, asRe denyCats, asRe allowSns, asRe denySns, asRe allowEts, asRe denyEts)
4141
fun sn ->
4242
validCat sn
4343
&& validStream sn
4444
&& (includeSystem || isTransactionalStream sn)
4545

46-
member val EventFilter = filter (fun (x: Propulsion.Sinks.Event) -> x.EventType) (allowEts, denyEts)
46+
member _.CreateEventFilter<'EventBody>() = filter (fun (x: FsCodec.ITimelineEvent<'EventBody>) -> x.EventType) (allowEts, denyEts)

tools/Propulsion.Tool/Sync.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ let run appName (c: Args.Configuration, p: ParseResults<Parameters>) = async {
260260
|> Propulsion.Codec.NewtonsoftJson.Serdes.Serialize
261261
do! producer.ProduceAsync(FsCodec.StreamName.toString stream, json) |> Async.Ignore
262262
return Outcome.render_ stream ham spam 0, Propulsion.Sinks.Events.next events }
263-
Propulsion.Sinks.Factory.StartConcurrent(Log.Logger, maxReadAhead, maxConcurrentProcessors, handle a.Filters.EventFilter, stats,
263+
let eventFilter = a.Filters.CreateEventFilter()
264+
Propulsion.Sinks.Factory.StartConcurrent(Log.Logger, maxReadAhead, maxConcurrentProcessors, handle eventFilter, stats,
264265
requireAll = requireAll)
265266
| SubCommand.Sync sa ->
266267
let eventsContext = sa.ConnectEvents() |> Async.RunSynchronously

0 commit comments

Comments
 (0)