private void checkSendUpdateConfigMessage ( String site1 , String site2 , Status site1Status , Status site2Status ) throws Exception { String repo ; String revision ; String branch ; if ( includeConfig ) { repo = site1Status . getConfigRepo ( ) ; revision = site1Status . getConfigRevision ( ) ; branch = site1Status . getConfigBranch ( ) ; if ( ! StringUtils . isEmptyOrNull ( repo ) && ! StringUtils . isEmptyOrNull ( revision ) && ! StringUtils . isEmptyOrNull ( branch ) ) { if ( ! repo . equals ( site2Status . getConfigRepo ( ) ) || ! revision . equals ( site2Status . getConfigRevision ( ) ) || ! branch . equals ( site2Status . getConfigBranch ( ) ) ) { System . out . println ( "Sending update/config message to [" + site2 + "]" ) ; UpdateCommand . sendUpdateMessage ( site2 , repo , branch , revision , "Cloned config from [" + site1 + "]: " + comment , token , UpdateConfigCommand . UPDATE_CONFIG_ENDPOINT , UpdateRequest . CONFIG_BRANCH_PREFIX ) ; } else { System . out . println ( "Source [" + site1 + "] is on the same configuration repo, branch, and revision as the target [" + site2 + "]." ) ; } } else { System . out . println ( "Configuration status not available from source site [" + site1 + "]" ) ; } } }
Checks if a config update message is necessary and sends it if it is .