Exemplo n.º 1
0
 /**
  * @param int $offset
  */
 public function syncGrouphubGroups($offset = 0)
 {
     $this->logger->info('Processing Grouphub groups ' . $offset . ' to ' . ($offset + self::BATCH_SIZE) . '...');
     $grouphubGroups = $this->api->findGrouphubGroups($offset, self::BATCH_SIZE);
     $ldapGroups = $this->ldap->findGrouphubGroups($offset, self::BATCH_SIZE);
     if (count($grouphubGroups) === 0 && count($ldapGroups) === 0) {
         $this->logger->info('Done syncing Grouphub groups!');
         return;
     }
     $index = $this->doGrouphubGroupsSync($grouphubGroups, $ldapGroups);
     $this->syncGrouphubGroups($offset + $index + 1);
 }