public BuildServer(string name, IBuildServerClient client) : base(name, null) { _client = client; _perf = new BuildServerPerformance(); BackScheduler.Instance.Add(this, 1000); }
/// <summary> /// Initialize the cache from the specified build server and VCS clients. /// </summary> /// <param name="buildServerClient">The build server client.</param> public void Initialize(IBuildServerClient buildServerClient) { // CONSIDERED: Retry if host down // This will add too much complexity right now and strange race // conditions between the start of the build server and the // notification manager. For now, if you restart the build server // you must also restart the notification manager. Also, we don't // want to switch to a polling model, or implement any kind of // queueing. It's simply not worth the effort, given the current // known (estimated) likelihood of all these strange conditions // occurring. foreach (IBuildServerNotification buildNotification in buildServerClient.GetAllBuildsThatRequireAttention()) { this.Update(buildNotification); } foreach (IBuildServerNotification buildNotification in buildServerClient.GetAllActiveBuildNotifications()) { this.Update(buildNotification); } }