Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Dec 6, 2021
1 parent 0191776 commit e300a63
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Propulsion.Cosmos/CosmosPruner.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module Pruner =
totalDeferred <- totalDeferred + deferred

/// Used to render exceptions that don't fall into the rate-limiting or timed-out categories
override _.HandleExn(log, exn) =
override _.HandleExn(log, _stream, exn) =
match classify exn with
| ExceptionKind.RateLimited | ExceptionKind.TimedOut ->
() // Outcomes are already included in the statistics - no logging is warranted
Expand Down
2 changes: 1 addition & 1 deletion src/Propulsion.CosmosStore/CosmosStorePruner.fs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module Pruner =
totalDeferred <- totalDeferred + deferred

/// Used to render exceptions that don't fall into the rate-limiting or timed-out categories
override _.HandleExn(log, exn) =
override _.HandleExn(log, _stream, exn) =
match classify exn with
| ExceptionKind.RateLimited | ExceptionKind.TimedOut ->
() // Outcomes are already included in the statistics - no logging is warranted
Expand Down
4 changes: 2 additions & 2 deletions src/Propulsion/Streams.fs
Original file line number Diff line number Diff line change
Expand Up @@ -998,9 +998,9 @@ type Stats<'Outcome>(log : ILogger, statsInterval, statesInterval) =
exnEvents <- exnEvents + es
exnBytes <- exnBytes + int64 bs
resultExnOther <- resultExnOther + 1
this.HandleExn(log.ForContext("stream", stream).ForContext("events", es).ForContext("duration", duration), exn)
this.HandleExn(log.ForContext("stream", stream).ForContext("events", es).ForContext("duration", duration), stream, exn)
abstract member HandleOk : outcome : 'Outcome -> unit
abstract member HandleExn : log : ILogger * exn : exn -> unit
abstract member HandleExn : log : ILogger * streamName : FsCodec.StreamName * exn : exn -> unit

module Projector =

Expand Down
2 changes: 1 addition & 1 deletion tests/Propulsion.Kafka.Integration/ConsumersIntegration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ module Helpers =
inherit Propulsion.Streams.Stats<unit>(log, statsInterval, stateInterval)

override _.HandleOk(()) = ()
override _.HandleExn(log, exn) = log.Information(exn, "Unhandled")
override _.HandleExn(log, _stream, exn) = log.Information(exn, "Unhandled")

let runConsumersBatch log (config : KafkaConsumerConfig) (numConsumers : int) (timeout : TimeSpan option) (handler : ConsumerCallback) = async {
let mkConsumer (consumerId : int) = async {
Expand Down
2 changes: 1 addition & 1 deletion tools/Propulsion.Tool/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ type Stats(log, statsInterval, statesInterval) =
inherit Propulsion.Streams.Stats<unit>(log, statsInterval=statsInterval, statesInterval=statesInterval)
member val StatsInterval = statsInterval
override _.HandleOk(_log) = ()
override _.HandleExn(_log, _exn) = ()
override _.HandleExn(_log, _stream, _exn) = ()

[<EntryPoint>]
let main argv =
Expand Down

0 comments on commit e300a63

Please sign in to comment.