For this purpose *running:any* parameter was used. If there are no running
builds, it will pick-up the same latestBuild as was before

If I would use *running:true*, it fails if there are no running builds


On Fri, Jan 11, 2013 at 11:54 AM, Tatham Oddie <notifications@github.com>wrote:

> In TeamFlash/Program.cs:
>
> > @@ -199,7 +199,13 @@ static void TurnOffLights(Monitor monitor)
> >
> >                          if ("success".Equals(latestBuild.Status, StringComparison.CurrentCultureIgnoreCase))
> >                          {
> > -                            continue;
> > +                            dynamic runningBuild = new Query(serverUrl, username, password) { RestBasePath = string.Format("/httpAuth/app/rest/buildTypes/id:{0}/builds/running:any", buildType.Id) };
> > +
> > +                            runningBuild.Load();
> > +                            if ("success".Equals(runningBuild.Status, StringComparison.CurrentCultureIgnoreCase))
> > +                            {
> > +                                continue;
>
> How will this code work when there are no running builds?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Readify/TeamFlash/pull/3/files#r2613512>.
>
>