Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Jul 16, 2024
1 parent e1c3c4b commit fc1a84d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Propulsion.CosmosStore/EquinoxSystemTextJsonParser.fs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module EquinoxSystemTextJsonParser =
| ValueNone -> ValueNone
| ValueSome struct (s, xs, u) -> ValueSome <| seq {
for x in enumEquinoxCosmosBatchOrTip (if withUnfolds then u else ValueNone) xs do
s, x }
yield s, x }

/// Attempts to parse the Events from an Equinox.CosmosStore Batch or Tip Item represented as a JsonDocument
/// returns ValueNone if it does not bear the hallmarks of a valid Batch, or the streamFilter predicate rejects
Expand Down
5 changes: 3 additions & 2 deletions src/Propulsion/Streams.fs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ module Scheduling =
member _.MarkBusy stream =
markBusy stream

member _.RecordProgress(stream, index) =
member _.RecordCompleted(stream, index) =
markNotBusy stream
markCompleted stream index

Expand Down Expand Up @@ -842,8 +842,9 @@ module Scheduling =
let handleResult ({ stream = stream; index = i; event = et; duration = duration; result = r }: InternalRes<_>) =
match dispatcher.InterpretProgress(streams, stream, r) with
| Ok (r: 'R), ValueSome index' ->
// TODO also need to know what batch we've reached wrt the unfolds
batches.MarkStreamProgress(stream, index')
streams.RecordProgress(stream, index')
streams.RecordCompleted(stream, index')
stats.Handle { duration = duration; stream = stream; index = i; event = et; index' = index'; result = Ok r }
| Ok (r: 'R), ValueNone ->
streams.RecordNoProgress(stream)
Expand Down

0 comments on commit fc1a84d

Please sign in to comment.