Skip to content

Commit

Permalink
Minor adjustments in OutcomeLogger and newQueue<_,_>
Browse files Browse the repository at this point in the history
  • Loading branch information
blumu committed Aug 3, 2019
1 parent f5ba320 commit 3700f78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions FSharpLu.Azure.Test/QueueServiceHandlerTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ module InMemorySchedulerTest =
ignore // no heartbeat
cts.Token
(fun _ -> []) // no tags
{new OutcomeLogger with member __.log _ = ()} // no logger
{new OutcomeLogger<_, _> with member __.log _ = ()} // no logger
with
| QueueScheduler.ProcessingLoopCancelled ->
Trace.warning "Processing loop terminated by Azure."
Expand Down Expand Up @@ -289,7 +289,7 @@ module AzureQueueSchedulerTest =
ignore // no heartbeat
terminationRequested
(fun _ -> []) // no tags
{new OutcomeLogger with member __.log _ = ()} // no logger
{new OutcomeLogger<_,_> with member __.log _ = ()} // no logger
with
| QueueScheduler.ProcessingLoopCancelled ->
Trace.warning "Processing loop terminated by Azure."
Expand Down
8 changes: 4 additions & 4 deletions FSharpLu.Azure/AzureQueueServiceHandler.fs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module QueueScheduler =
abstract k<'Request, 'Result> : Async<Agent.ExecutionInstruction<'Request, 'Result>> -> Async<unit>

/// Loggger interface for request outcome
type OutcomeLogger =
type OutcomeLogger<'Request, 'QueueMessage> =
abstract log : RequestOutcome<'Request, 'Result, 'QueueMessage> -> unit

/// Handler for queued requests
Expand Down Expand Up @@ -156,7 +156,7 @@ module QueueScheduler =
(queuedMessage:'QueueMessage)
(handler:Handler<'Context, 'Request>)
(getTags:'Request -> (string*string) list)
(logger: OutcomeLogger) =
(logger: OutcomeLogger<'Request, 'QueueMessage>) =
async {

let requestInsertionTime =
Expand Down Expand Up @@ -264,7 +264,7 @@ module QueueScheduler =
(signalHeartBeat : unit -> unit)
(terminationRequested: System.Threading.CancellationToken)
getTags
logger
(logger:OutcomeLogger<'Request, 'QueueMessage>)
=
async {
use processingPool = new Microsoft.FSharpLu.Async.Synchronization.Pool(options.ConcurrentRequestWorkers)
Expand Down Expand Up @@ -471,7 +471,7 @@ module AzureQueue =
: QueueScheduler.QueueingAPI<CloudQueueMessage, ^QueueContent> =
// Create the reference to the Azure queue
let queueClient = azureStorage.CreateCloudQueueClient()
let queueName = sprintf "%s-%A" queueNamePrefix queueId
let queueName = queueNamePrefix + "-" + ((sprintf "%A" queueId).ToLowerInvariant())
let queue = queueClient.GetQueueReference(queueName)
if not <| queue.CreateIfNotExists() then
Trace.info "Queue %s was already created." queueName
Expand Down

0 comments on commit 3700f78

Please sign in to comment.