Skip to content

Commit

Permalink
Removed a reference cell by returning a return code on each matched p…
Browse files Browse the repository at this point in the history
…attern's result expression.
  • Loading branch information
moodmosaic committed Jul 28, 2014
1 parent 3b41326 commit 57a3ed0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Src/Qaiain.CommandLine/Program.fs
Expand Up @@ -199,14 +199,13 @@ let main argv =

let handle msg = Mail.handle getMessage deleteMessage send msg

let exitCode = ref 0
match queue |> AzureQ.dequeue with
| Some(msg) ->
match msg.AsString |> handle with
| Success _ -> queue.DeleteMessage msg
| Success _ ->
queue.DeleteMessage msg
0
| Failure f ->
f |> toString |> Console.Error.WriteLine
exitCode := 13
| _ -> ()

!exitCode // return an integer exit code
13
| _ -> 0

0 comments on commit 57a3ed0

Please sign in to comment.