_ext/jboss_developer.rb
# Private: Issues a GET to Drupal to retrieve the sitemap.
Issues a GET to Drupal to retrieve the sitemap.
Issues a GET to Drupal to retrieve the sitemap .
def fetch_sitemap
        $LOG.verbose 'Calling Drupal cron and sitemap' if $LOG.verbose?
        cron_request = @faraday.get('/cron/rhd') do |req|
          req.options['timeout'] = 600;
        end
        unless cron_request.success?
          $LOG.error "Error invoking drupal cron. Status: #{cron_request.status}." if $LOG.error?
          exit(1)
        end
        sitemap_request = @faraday.get('/sitemap.xml')
        unless sitemap_request.success?
          $LOG.error "Error retreiving drupal sitemap. Status: #{sitemap_request.status}" if $LOG.error?
          exit(1)
        end
        parse_sitemap(sitemap_request)
      end
def fetch_sitemap $LOG . verbose 'Calling Drupal cron and sitemap' if $LOG . verbose? cron_request = @faraday . get ( '/cron/rhd' ) do | req | req . options [ 'timeout' ] = 600 ; end unless cron_request . success? $LOG . error "Error invoking drupal cron. Status: #{cron_request.status}." if $LOG . error? exit ( 1 ) end sitemap_request = @faraday . get ( '/sitemap.xml' ) unless sitemap_request . success? $LOG . error "Error retreiving drupal sitemap. Status: #{sitemap_request.status}" if $LOG . error? exit ( 1 ) end parse_sitemap ( sitemap_request ) end
Private: Issues a GET to Drupal to retrieve the sitemap.
Private : Issues a GET to Drupal to retrieve the sitemap .