* Run method for this pull service.
*/
@Override
public void run() {
for (FederationModel registration : registrations) {
FederationPullStatus was = registration.getLowestStatus();
try {
Date now = new Date(System.currentTimeMillis());
pull(registration);
sendStatusAcknowledgment(registration);
registration.lastPull = now;
FederationPullStatus is = registration.getLowestStatus();
if (is.ordinal() < was.ordinal()) {
// the status for this registration has downgraded
logger.warn("Federation pull status of {0} is now {1}", registration.name,
is.name());
if (registration.notifyOnError) {
String message = "Federation pull of " + registration.name + " @ "
+ registration.url + " is now at " + is.name();
gitblit.sendMailToAdministrators(
"Pull Status of " + registration.name + " is " + is.name(),
message);
}
}
} catch (Throwable t) {
logger.error(MessageFormat.format(