robots/cdx_merge_sort_publish.rb
# `perform` is the main entry point for the robot. This is where
# all of the robot's work is done.
#
# @param [String] druid -- the Druid identifier for the object to process
`perform` is the main entry point for the robot. This is where
all of the robot's work is done.
` perform ` is the main entry point for the robot . This is where all of the robot ' s work is done .
def perform(druid)
          cdx_working_directory = Dor::Config.was_crawl_dissemination.cdx_working_directory
          cdx_backup_directory = Dor::Config.was_crawl_dissemination.cdx_backup_directory
          cdx_merge_sort_publish = Dor::WASCrawl::CDXMergeSortPublishService.new( druid, cdx_working_directory, cdx_backup_directory)
          unless Dir["#{cdx_working_directory}/#{druid}/*"].empty?
            cdx_merge_sort_publish.sort_druid_cdx
            cdx_merge_sort_publish.merge_with_main_index
            cdx_merge_sort_publish.publish
          end
          cdx_merge_sort_publish.clean
        end
def perform ( druid ) cdx_working_directory = Dor :: Config . was_crawl_dissemination . cdx_working_directory cdx_backup_directory = Dor :: Config . was_crawl_dissemination . cdx_backup_directory cdx_merge_sort_publish = Dor :: WASCrawl :: CDXMergeSortPublishService . new ( druid , cdx_working_directory , cdx_backup_directory ) unless Dir [ "#{cdx_working_directory}/#{druid}/*" ] . empty? cdx_merge_sort_publish . sort_druid_cdx cdx_merge_sort_publish . merge_with_main_index cdx_merge_sort_publish . publish end cdx_merge_sort_publish . clean end
`perform` is the main entry point for the robot.
` perform ` is the main entry point for the robot .
druid
<not_specific>
<not_specific>
- the Druid identifier for the object to process
- the Druid identifier for the object to process