Package com.gitblit.Constants

Examples of com.gitblit.Constants.FederationPullStatus


   */
  public FederationPullStatus getLowestStatus() {
    if (results.size() == 0) {
      return FederationPullStatus.PENDING;
    }
    FederationPullStatus status = FederationPullStatus.MIRRORED;
    for (FederationPullStatus result : results.values()) {
      if (result.ordinal() < status.ordinal()) {
        status = result;
      }
    }
    return status;
  }
View Full Code Here


   * 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(
View Full Code Here

TOP

Related Classes of com.gitblit.Constants.FederationPullStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.