private void autoCheckAndChangeGitPullStatus(int buildId) throws IOException {
        // wait for a few seconds for last build to save to db
        // see if this fixes the build failures that are getting through. 
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        
        MavenTeamCity teamcitySettings = properties.getTeamCityCredentials(mavenSettingsTeamcityServerId);

        String buildServerUrl = teamcitySettings.getUrl();
        String buildServerUsername = teamcitySettings.getUsername();
        String buildServerPassword = teamcitySettings.getPassword();

        TeamCityRestRequest restRequest = new TeamCityRestRequest(buildServerUrl, buildServerUsername,
                buildServerPassword);

        Build build = new Build();
        build = restRequest.fetchBuildStatus(buildId);

        status = build.getStatus();
        
        System.out.println("autoCheckAndChangeGitPullStatus(): status=" + status);
        
        changeStatus(status);
    }