Skip to content

Commit

Permalink
CosmosStoreSource: Expose tailSleepInterval
Browse files Browse the repository at this point in the history
also make startFromTail optional
  • Loading branch information
bartelink committed Sep 7, 2022
1 parent c3b0e78 commit 1cfc295
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Propulsion.CosmosStore/CosmosStoreSource.fs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ type CosmosStoreSource =
static member Start
( log : ILogger,
monitored : Container, leases : Container, processorName, observer,
startFromTail, ?maxItems, ?lagReportFreq : TimeSpan, ?notifyError, ?customize) =
?maxItems, ?tailSleepInterval, ?startFromTail, ?lagReportFreq : TimeSpan, ?notifyError, ?customize) =
let databaseId, containerId = monitored.Database.Id, monitored.Id
#endif
let logLag (interval : TimeSpan) (remainingWork : (int*int64) list) = async {
Expand All @@ -158,7 +158,8 @@ type CosmosStoreSource =
let source =
ChangeFeedProcessor.Start
( log, monitored, leases, processorName, observer, ?notifyError=notifyError, ?customize=customize,
startFromTail=startFromTail, ?reportLagAndAwaitNextEstimation=maybeLogLag, ?maxItems=maxItems,
?maxItems = maxItems, ?feedPollDelay = tailSleepInterval, ?reportLagAndAwaitNextEstimation=maybeLogLag,
startFromTail = defaultArg startFromTail false,
leaseAcquireInterval=TimeSpan.FromSeconds 5., leaseRenewInterval=TimeSpan.FromSeconds 5., leaseTtl=TimeSpan.FromSeconds 10.)
lagReportFreq |> Option.iter (fun s -> log.Information("ChangeFeed {processorName} Lag stats interval {lagReportIntervalS:n0}s", processorName, s.TotalSeconds))
source
Expand Down

0 comments on commit 1cfc295

Please sign in to comment.