コード例 #1
0
 /**
  * Schedules the next check of the federated Gitblit instance.
  *
  * @param registration
  */
 private void schedule(FederationModel registration) {
   // schedule the next pull
   int mins = TimeUtils.convertFrequencyToMinutes(registration.frequency);
   registration.nextPull = new Date(System.currentTimeMillis() + (mins * 60 * 1000L));
   GitBlit.self()
       .executor()
       .schedule(new FederationPullExecutor(registration), mins, TimeUnit.MINUTES);
   logger.info(
       MessageFormat.format(
           "Next pull of {0} @ {1} scheduled for {2,date,yyyy-MM-dd HH:mm}",
           registration.name, registration.url, registration.nextPull));
 }