def create_segments
      file_paths = warc_paths(self.crawl_name)

      segments = parse_segments(file_paths)
      save if segments.count > 0

      segments.keys.each do |segment_name|
        file_count = segments[segment_name]
        CrawlSegment.create_segment(self, segment_name, file_count)
      end

      segments.count
    end
def create_segments
      file_paths = warc_paths(self.crawl_name)

      segments = parse_segments(file_paths)
      save if segments.count > 0

      segments.keys.each do |segment_name|
        file_count = segments[segment_name]
        CrawlSegment.create_segment(self, segment_name, file_count)
      end

      segments.count
    end
Creates crawl segments from the warc.paths file for this crawl.