From d4a079a69814529a5344783cb1ff4697d1d21dfe Mon Sep 17 00:00:00 2001 From: Ruben Bartelink Date: Tue, 22 Aug 2023 11:40:55 +0100 Subject: [PATCH] Target Equinox 4.0.0-rc.12.12 --- src/Propulsion.CosmosStore/Propulsion.CosmosStore.fsproj | 2 +- src/Propulsion.CosmosStore/ReaderCheckpoint.fs | 4 ++-- src/Propulsion.DynamoStore/Propulsion.DynamoStore.fsproj | 2 +- src/Propulsion.EventStore/Propulsion.EventStore.fsproj | 2 +- src/Propulsion.EventStoreDb/Propulsion.EventStoreDb.fsproj | 2 +- src/Propulsion.MemoryStore/Propulsion.MemoryStore.fsproj | 2 +- src/Propulsion/Internal.fs | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Propulsion.CosmosStore/Propulsion.CosmosStore.fsproj b/src/Propulsion.CosmosStore/Propulsion.CosmosStore.fsproj index f3285245..592df352 100644 --- a/src/Propulsion.CosmosStore/Propulsion.CosmosStore.fsproj +++ b/src/Propulsion.CosmosStore/Propulsion.CosmosStore.fsproj @@ -17,7 +17,7 @@ - + diff --git a/src/Propulsion.CosmosStore/ReaderCheckpoint.fs b/src/Propulsion.CosmosStore/ReaderCheckpoint.fs index 36564d37..8a4a2662 100644 --- a/src/Propulsion.CosmosStore/ReaderCheckpoint.fs +++ b/src/Propulsion.CosmosStore/ReaderCheckpoint.fs @@ -122,7 +122,7 @@ let decideUpdate at pos = function #if COSMOSV3 module Equinox = module LoadOption = let AnyCachedValue = () type Equinox.Decider<'e, 's> with - member x.TransactAsync(decide, load : unit): Async<'r> = + member x.Transact(decide, load : unit): Async<'r> = x.TransactAsync(fun s -> async { let! r, es = decide s in return r, Array.toList es }) member x.Transact(decide, load : unit): Async<'r> = x.Transact(decide >> function r, es -> r, Array.toList es) @@ -139,7 +139,7 @@ type Service internal (resolve: SourceId * TrancheId * string -> Equinox.Decider member _.Start(source, tranche, establishOrigin, ct) : Task = let decider = resolve (source, tranche, consumerGroupName) let establishOrigin = match establishOrigin with None -> async { return Position.initial } | Some f -> Async.call f.Invoke - decider.TransactAsync(decideStart establishOrigin DateTimeOffset.UtcNow defaultCheckpointFrequency, load = Equinox.LoadOption.AnyCachedValue) + decider.Transact(decideStart establishOrigin DateTimeOffset.UtcNow defaultCheckpointFrequency, load = Equinox.LoadOption.AnyCachedValue) |> Async.executeAsTask ct /// Ingest a position update diff --git a/src/Propulsion.DynamoStore/Propulsion.DynamoStore.fsproj b/src/Propulsion.DynamoStore/Propulsion.DynamoStore.fsproj index 97f13b5e..04a83dd9 100644 --- a/src/Propulsion.DynamoStore/Propulsion.DynamoStore.fsproj +++ b/src/Propulsion.DynamoStore/Propulsion.DynamoStore.fsproj @@ -23,7 +23,7 @@ - + diff --git a/src/Propulsion.EventStore/Propulsion.EventStore.fsproj b/src/Propulsion.EventStore/Propulsion.EventStore.fsproj index 31160b0b..46e1a9bf 100644 --- a/src/Propulsion.EventStore/Propulsion.EventStore.fsproj +++ b/src/Propulsion.EventStore/Propulsion.EventStore.fsproj @@ -16,7 +16,7 @@ - + diff --git a/src/Propulsion.EventStoreDb/Propulsion.EventStoreDb.fsproj b/src/Propulsion.EventStoreDb/Propulsion.EventStoreDb.fsproj index 421f22f1..2be1ab93 100644 --- a/src/Propulsion.EventStoreDb/Propulsion.EventStoreDb.fsproj +++ b/src/Propulsion.EventStoreDb/Propulsion.EventStoreDb.fsproj @@ -15,7 +15,7 @@ - + diff --git a/src/Propulsion.MemoryStore/Propulsion.MemoryStore.fsproj b/src/Propulsion.MemoryStore/Propulsion.MemoryStore.fsproj index cdc22810..33b13247 100644 --- a/src/Propulsion.MemoryStore/Propulsion.MemoryStore.fsproj +++ b/src/Propulsion.MemoryStore/Propulsion.MemoryStore.fsproj @@ -19,7 +19,7 @@ - + diff --git a/src/Propulsion/Internal.fs b/src/Propulsion/Internal.fs index d928b8ee..d069819d 100644 --- a/src/Propulsion/Internal.fs +++ b/src/Propulsion/Internal.fs @@ -75,10 +75,10 @@ module Channel = let unboundedSw<'t> = Channel.CreateUnbounded<'t>(UnboundedChannelOptions(SingleWriter = true)) let unboundedSwSr<'t> = Channel.CreateUnbounded<'t>(UnboundedChannelOptions(SingleWriter = true, SingleReader = true)) let boundedSw<'t> c = Channel.CreateBounded<'t>(BoundedChannelOptions(c, SingleWriter = true)) - let waitToWrite (w : ChannelWriter<_>) ct = w.WaitToWriteAsync(ct).AsTask() :> Task + let waitToWrite (w : ChannelWriter<_>) ct = let vt = w.WaitToWriteAsync(ct) in vt.AsTask() :> Task let tryWrite (w : ChannelWriter<_>) = w.TryWrite let write (w : ChannelWriter<_>) = w.TryWrite >> ignore - let inline awaitRead (r : ChannelReader<_>) ct = r.WaitToReadAsync(ct).AsTask() + let inline awaitRead (r : ChannelReader<_>) ct = let vt = r.WaitToReadAsync(ct) in vt.AsTask() let inline tryRead (r : ChannelReader<_>) () = let mutable msg = Unchecked.defaultof<_> if r.TryRead(&msg) then ValueSome msg else ValueNone