Add retry for cursor DSL operations
This commit is contained in:
parent
a8af285cae
commit
9281941603
@ -934,6 +934,16 @@ type RethinkBuilder<'T> () =
|
|||||||
member this.WithRetryOption (f : IConnection -> Task<'T option>, retries : float seq, conn : IConnection) =
|
member this.WithRetryOption (f : IConnection -> Task<'T option>, retries : float seq, conn : IConnection) =
|
||||||
this.WithRetryOption (f, retries) conn
|
this.WithRetryOption (f, retries) conn
|
||||||
|
|
||||||
|
/// Retries a variable number of times, waiting each time for the seconds specified
|
||||||
|
[<CustomOperation "withRetryCursor">]
|
||||||
|
member _.WithRetryCursor (f : IConnection -> Task<Cursor<'T>>, retries : float seq) =
|
||||||
|
withRetry<Cursor<'T>> retries f
|
||||||
|
|
||||||
|
/// Retries a variable number of times, waiting each time for the seconds specified
|
||||||
|
[<CustomOperation "withRetryCursor">]
|
||||||
|
member this.WithRetryCursor (f : IConnection -> Task<Cursor<'T>>, retries : float seq, conn : IConnection) =
|
||||||
|
this.WithRetryCursor (f, retries) conn
|
||||||
|
|
||||||
/// Retries a variable number of times, waiting each time for the seconds specified
|
/// Retries a variable number of times, waiting each time for the seconds specified
|
||||||
[<CustomOperation "withAsyncRetry">]
|
[<CustomOperation "withAsyncRetry">]
|
||||||
member _.WithAsyncRetry (f : IConnection -> Async<'T>, retries : float seq) = withAsyncRetry<'T> retries f
|
member _.WithAsyncRetry (f : IConnection -> Async<'T>, retries : float seq) = withAsyncRetry<'T> retries f
|
||||||
@ -953,6 +963,16 @@ type RethinkBuilder<'T> () =
|
|||||||
member this.WithAsyncRetryOption (f : IConnection -> Async<'T option>, retries : float seq, conn : IConnection) =
|
member this.WithAsyncRetryOption (f : IConnection -> Async<'T option>, retries : float seq, conn : IConnection) =
|
||||||
this.WithAsyncRetryOption (f, retries) conn
|
this.WithAsyncRetryOption (f, retries) conn
|
||||||
|
|
||||||
|
/// Retries a variable number of times, waiting each time for the seconds specified
|
||||||
|
[<CustomOperation "withAsyncRetryCursor">]
|
||||||
|
member _.WithAsyncRetryCursor (f : IConnection -> Async<Cursor<'T>>, retries : float seq) =
|
||||||
|
withAsyncRetry<Cursor<'T>> retries f
|
||||||
|
|
||||||
|
/// Retries a variable number of times, waiting each time for the seconds specified
|
||||||
|
[<CustomOperation "withAsyncRetryCursor">]
|
||||||
|
member this.WithAsyncRetryCursor (f : IConnection -> Async<Cursor<'T>>, retries : float seq, conn : IConnection) =
|
||||||
|
this.WithAsyncRetryCursor (f, retries) conn
|
||||||
|
|
||||||
/// Retries a variable number of times, waiting each time for the seconds specified
|
/// Retries a variable number of times, waiting each time for the seconds specified
|
||||||
[<CustomOperation "withSyncRetry">]
|
[<CustomOperation "withSyncRetry">]
|
||||||
member _.WithSyncRetry (f : IConnection -> 'T, retries : float seq) = withSyncRetry<'T> retries f
|
member _.WithSyncRetry (f : IConnection -> 'T, retries : float seq) = withSyncRetry<'T> retries f
|
||||||
@ -972,6 +992,16 @@ type RethinkBuilder<'T> () =
|
|||||||
member this.WithSyncRetryOption (f : IConnection -> 'T option, retries : float seq, conn : IConnection) =
|
member this.WithSyncRetryOption (f : IConnection -> 'T option, retries : float seq, conn : IConnection) =
|
||||||
this.WithSyncRetryOption (f, retries) conn
|
this.WithSyncRetryOption (f, retries) conn
|
||||||
|
|
||||||
|
/// Retries a variable number of times, waiting each time for the seconds specified
|
||||||
|
[<CustomOperation "withSyncRetryCursor">]
|
||||||
|
member _.WithSyncRetryCursor (f : IConnection -> Cursor<'T>, retries : float seq) =
|
||||||
|
withSyncRetry<Cursor<'T>> retries f
|
||||||
|
|
||||||
|
/// Retries a variable number of times, waiting each time for the seconds specified
|
||||||
|
[<CustomOperation "withSyncRetryCursor">]
|
||||||
|
member this.WithSyncRetryCursor (f : IConnection -> Cursor<'T>, retries : float seq, conn : IConnection) =
|
||||||
|
this.WithSyncRetryCursor (f, retries) conn
|
||||||
|
|
||||||
/// Retries at 200ms, 500ms, and 1s
|
/// Retries at 200ms, 500ms, and 1s
|
||||||
[<CustomOperation "withRetryDefault">]
|
[<CustomOperation "withRetryDefault">]
|
||||||
member _.WithRetryDefault (f : IConnection -> Task<'T>) = withRetryDefault<'T> f
|
member _.WithRetryDefault (f : IConnection -> Task<'T>) = withRetryDefault<'T> f
|
||||||
@ -989,6 +1019,15 @@ type RethinkBuilder<'T> () =
|
|||||||
member this.WithRetryOptionDefault (f : IConnection -> Task<'T option>, conn : IConnection) =
|
member this.WithRetryOptionDefault (f : IConnection -> Task<'T option>, conn : IConnection) =
|
||||||
this.WithRetryOptionDefault f conn
|
this.WithRetryOptionDefault f conn
|
||||||
|
|
||||||
|
/// Retries at 200ms, 500ms, and 1s
|
||||||
|
[<CustomOperation "withRetryCursorDefault">]
|
||||||
|
member _.WithRetryCursorDefault (f : IConnection -> Task<Cursor<'T>>) = withRetryDefault<Cursor<'T>> f
|
||||||
|
|
||||||
|
/// Retries at 200ms, 500ms, and 1s
|
||||||
|
[<CustomOperation "withRetryCursorDefault">]
|
||||||
|
member this.WithRetryCursorDefault (f : IConnection -> Task<Cursor<'T>>, conn : IConnection) =
|
||||||
|
this.WithRetryCursorDefault f conn
|
||||||
|
|
||||||
/// Retries at 200ms, 500ms, and 1s
|
/// Retries at 200ms, 500ms, and 1s
|
||||||
[<CustomOperation "withAsyncRetryDefault">]
|
[<CustomOperation "withAsyncRetryDefault">]
|
||||||
member _.WithAsyncRetryDefault (f : IConnection -> Async<'T>) = withAsyncRetryDefault<'T> f
|
member _.WithAsyncRetryDefault (f : IConnection -> Async<'T>) = withAsyncRetryDefault<'T> f
|
||||||
@ -1007,6 +1046,15 @@ type RethinkBuilder<'T> () =
|
|||||||
member this.WithAsyncRetryOptionDefault (f : IConnection -> Async<'T option>, conn : IConnection) =
|
member this.WithAsyncRetryOptionDefault (f : IConnection -> Async<'T option>, conn : IConnection) =
|
||||||
this.WithAsyncRetryOptionDefault f conn
|
this.WithAsyncRetryOptionDefault f conn
|
||||||
|
|
||||||
|
/// Retries at 200ms, 500ms, and 1s
|
||||||
|
[<CustomOperation "withAsyncRetryCursorDefault">]
|
||||||
|
member _.WithAsyncRetryCursorDefault (f : IConnection -> Async<Cursor<'T>>) = withAsyncRetryDefault<Cursor<'T>> f
|
||||||
|
|
||||||
|
/// Retries at 200ms, 500ms, and 1s
|
||||||
|
[<CustomOperation "withAsyncRetryCursorDefault">]
|
||||||
|
member this.WithAsyncRetryCursorDefault (f : IConnection -> Async<Cursor<'T>>, conn : IConnection) =
|
||||||
|
this.WithAsyncRetryCursorDefault f conn
|
||||||
|
|
||||||
/// Retries at 200ms, 500ms, and 1s
|
/// Retries at 200ms, 500ms, and 1s
|
||||||
[<CustomOperation "withSyncRetryDefault">]
|
[<CustomOperation "withSyncRetryDefault">]
|
||||||
member _.WithSyncRetryDefault (f : IConnection -> 'T) = withSyncRetryDefault<'T> f
|
member _.WithSyncRetryDefault (f : IConnection -> 'T) = withSyncRetryDefault<'T> f
|
||||||
@ -1024,6 +1072,15 @@ type RethinkBuilder<'T> () =
|
|||||||
member this.WithSyncRetryOptionDefault (f : IConnection -> 'T option, conn : IConnection) =
|
member this.WithSyncRetryOptionDefault (f : IConnection -> 'T option, conn : IConnection) =
|
||||||
this.WithSyncRetryOptionDefault f conn
|
this.WithSyncRetryOptionDefault f conn
|
||||||
|
|
||||||
|
/// Retries at 200ms, 500ms, and 1s
|
||||||
|
[<CustomOperation "withSyncRetryCursorDefault">]
|
||||||
|
member _.WithSyncRetryCursorDefault (f : IConnection -> Cursor<'T>) = withSyncRetryDefault<Cursor<'T>> f
|
||||||
|
|
||||||
|
/// Retries at 200ms, 500ms, and 1s
|
||||||
|
[<CustomOperation "withSyncRetryCursorDefault">]
|
||||||
|
member this.WithSyncRetryCursorDefault (f : IConnection -> Cursor<'T>, conn : IConnection) =
|
||||||
|
this.WithSyncRetryCursorDefault f conn
|
||||||
|
|
||||||
/// Retries once immediately
|
/// Retries once immediately
|
||||||
[<CustomOperation "withRetryOnce">]
|
[<CustomOperation "withRetryOnce">]
|
||||||
member _.WithRetryOnce (f : IConnection -> Task<'T>) = withRetryOnce<'T> f
|
member _.WithRetryOnce (f : IConnection -> Task<'T>) = withRetryOnce<'T> f
|
||||||
@ -1041,6 +1098,15 @@ type RethinkBuilder<'T> () =
|
|||||||
member this.WithRetryOptionOnce (f : IConnection -> Task<'T option>, conn : IConnection) =
|
member this.WithRetryOptionOnce (f : IConnection -> Task<'T option>, conn : IConnection) =
|
||||||
this.WithRetryOptionOnce f conn
|
this.WithRetryOptionOnce f conn
|
||||||
|
|
||||||
|
/// Retries once immediately
|
||||||
|
[<CustomOperation "withRetryCursorOnce">]
|
||||||
|
member _.WithRetryCursorOnce (f : IConnection -> Task<Cursor<'T>>) = withRetryOnce<Cursor<'T>> f
|
||||||
|
|
||||||
|
/// Retries once immediately
|
||||||
|
[<CustomOperation "withRetryCursorOnce">]
|
||||||
|
member this.WithRetryCursorOnce (f : IConnection -> Task<Cursor<'T>>, conn : IConnection) =
|
||||||
|
this.WithRetryCursorOnce f conn
|
||||||
|
|
||||||
/// Retries once immediately
|
/// Retries once immediately
|
||||||
[<CustomOperation "withAsyncRetryOnce">]
|
[<CustomOperation "withAsyncRetryOnce">]
|
||||||
member _.WithAsyncRetryOnce (f : IConnection -> Async<'T>) = withAsyncRetryOnce<'T> f
|
member _.WithAsyncRetryOnce (f : IConnection -> Async<'T>) = withAsyncRetryOnce<'T> f
|
||||||
@ -1058,6 +1124,15 @@ type RethinkBuilder<'T> () =
|
|||||||
member this.WithAsyncRetryOptionOnce (f : IConnection -> Async<'T option>, conn : IConnection) =
|
member this.WithAsyncRetryOptionOnce (f : IConnection -> Async<'T option>, conn : IConnection) =
|
||||||
this.WithAsyncRetryOptionOnce f conn
|
this.WithAsyncRetryOptionOnce f conn
|
||||||
|
|
||||||
|
/// Retries once immediately
|
||||||
|
[<CustomOperation "withAsyncRetryCursorOnce">]
|
||||||
|
member _.WithAsyncRetryCursorOnce (f : IConnection -> Async<Cursor<'T>>) = withAsyncRetryOnce<Cursor<'T>> f
|
||||||
|
|
||||||
|
/// Retries once immediately
|
||||||
|
[<CustomOperation "withAsyncRetryCursorOnce">]
|
||||||
|
member this.WithAsyncRetryCursorOnce (f : IConnection -> Async<Cursor<'T>>, conn : IConnection) =
|
||||||
|
this.WithAsyncRetryCursorOnce f conn
|
||||||
|
|
||||||
/// Retries once immediately
|
/// Retries once immediately
|
||||||
[<CustomOperation "withSyncRetryOnce">]
|
[<CustomOperation "withSyncRetryOnce">]
|
||||||
member _.WithSyncRetryOnce (f : IConnection -> 'T) = withSyncRetryOnce<'T> f
|
member _.WithSyncRetryOnce (f : IConnection -> 'T) = withSyncRetryOnce<'T> f
|
||||||
@ -1075,6 +1150,15 @@ type RethinkBuilder<'T> () =
|
|||||||
member this.WithSyncRetryOptionOnce (f : IConnection -> 'T option, conn : IConnection) =
|
member this.WithSyncRetryOptionOnce (f : IConnection -> 'T option, conn : IConnection) =
|
||||||
this.WithSyncRetryOptionOnce f conn
|
this.WithSyncRetryOptionOnce f conn
|
||||||
|
|
||||||
|
/// Retries once immediately
|
||||||
|
[<CustomOperation "withSyncRetryCursorOnce">]
|
||||||
|
member _.WithSyncRetryCursorOnce (f : IConnection -> Cursor<'T>) = withSyncRetryOnce<Cursor<'T>> f
|
||||||
|
|
||||||
|
/// Retries once immediately
|
||||||
|
[<CustomOperation "withSyncRetryCursorOnce">]
|
||||||
|
member this.WithSyncRetryCursorOnce (f : IConnection -> Cursor<'T>, conn : IConnection) =
|
||||||
|
this.WithSyncRetryCursorOnce f conn
|
||||||
|
|
||||||
|
|
||||||
/// RethinkDB computation expression
|
/// RethinkDB computation expression
|
||||||
let rethink<'T> = RethinkBuilder<'T> ()
|
let rethink<'T> = RethinkBuilder<'T> ()
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
<Copyright>See LICENSE</Copyright>
|
<Copyright>See LICENSE</Copyright>
|
||||||
<PackageTags>RethinkDB document F#</PackageTags>
|
<PackageTags>RethinkDB document F#</PackageTags>
|
||||||
<VersionPrefix>0.9.0</VersionPrefix>
|
<VersionPrefix>0.9.0</VersionPrefix>
|
||||||
<VersionSuffix>beta-04</VersionSuffix>
|
<VersionSuffix>beta-05</VersionSuffix>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
Add cursor / toList functions and DSL operations
|
Add retry for cursor DSL operations
|
||||||
</PackageReleaseNotes>
|
</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user