Skip to content

Commit

Permalink
Async.StartAsTask doesn't work on codebetter's teamcity. Using Async.…
Browse files Browse the repository at this point in the history
…Start instead.
  • Loading branch information
mausch committed Nov 11, 2010
1 parent 4ae6530 commit c33b10c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fake.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ let solr = "solr-1.4.0"
// helper functions
let httpGet = Fake.REST.ExecuteGetCommand null null

let liftAsync f ma = async.Bind(ma, fun a -> async.Return(f a))

[<AutoOpen>]
module Xml =
let (.>) (a: #seq<XElement>) (b: string) = Extensions.Descendants(a, xname b)
Expand All @@ -23,7 +25,7 @@ module Xml =
module Solr =
let private cmdline = "-DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar"
let start() =
Shell.AsyncExec("java", cmdline, dir = solr) |> Async.StartAsTask |> ignore
Shell.AsyncExec("java", cmdline, dir = solr) |> liftAsync ignore |> Async.Start
let watch = System.Diagnostics.Stopwatch.StartNew()
while httpGet "http://localhost:8983/solr/admin/ping" = null do
if watch.Elapsed > (TimeSpan.FromSeconds 10.)
Expand Down

0 comments on commit c33b10c

Please sign in to comment.