guardian/deploy — pull request #69 by sihil (2013-02-01 12:16:23+00:00)
Title: Fix teamcity polling

TeamCity polling was fundamentally broken.

I had been only checking for any builds with a TeamCity build ID number later than the last one I knew about. However, if two builds ran and one of them started earlier but finished later than the other one then the polling mechanism would often fail to pick up the build that finished second as the one that finished first would have a later build ID.

The poller now asks TC for all builds that have finished in the last 60 minutes (by default). Provided no builds take longer to successfully run than this - it will no longer miss any builds.

As a result I've been able to switch to incremental updates which are a lot quicker, have less load on the TC server and can be run more frequently.