_docker/lib/export/httrack_export_strategy.rb
#
# Rolls over the export cache if we have reached the maximum allowed number of cache updates
#
Rolls over the export cache if we have reached the maximum allowed number of cache updates
Rolls over the export cache if we have reached the maximum allowed number of cache updates
def roll_over_export_cache(export_directory, drupal_host)
    @log.info('Rolling over httrack export cache as maximum cache updates has been reached...')
    htscache_rolled = "#{export_directory}/hts-cache.rolled"
    FileUtils.rm_rf(htscache_rolled) if Dir.exist?(htscache_rolled)
    FileUtils.mv("#{export_directory}/hts-cache", htscache_rolled) if Dir.exist?("#{export_directory}/hts-cache")
    FileUtils.mv("#{export_directory}/index.html","#{export_directory}/index.html.rolled") if File.exist?("#{export_directory}/index.html")
    export = determine_export_directory_from_drupal_host(drupal_host)
    export_rolled = "#{export_directory}/#{export}.rolled"
    FileUtils.rm_rf(export_rolled) if Dir.exist?(export_rolled)
    FileUtils.mv("#{export_directory}/#{export}", export_rolled) if Dir.exist?("#{export_directory}/#{export}")
  end
def roll_over_export_cache ( export_directory , drupal_host ) @log . info ( 'Rolling over httrack export cache as maximum cache updates has been reached...' ) htscache_rolled = "#{export_directory}/hts-cache.rolled" FileUtils . rm_rf ( htscache_rolled ) if Dir . exist? ( htscache_rolled ) FileUtils . mv ( "#{export_directory}/hts-cache" , htscache_rolled ) if Dir . exist? ( "#{export_directory}/hts-cache" ) FileUtils . mv ( "#{export_directory}/index.html" , "#{export_directory}/index.html.rolled" ) if File . exist? ( "#{export_directory}/index.html" ) export = determine_export_directory_from_drupal_host ( drupal_host ) export_rolled = "#{export_directory}/#{export}.rolled" FileUtils . rm_rf ( export_rolled ) if Dir . exist? ( export_rolled ) FileUtils . mv ( "#{export_directory}/#{export}" , export_rolled ) if Dir . exist? ( "#{export_directory}/#{export}" ) end
Rolls over the export cache if we have reached the maximum allowed number of cache updates
Rolls over the export cache if we have reached the maximum allowed number of cache updates
export_directory
<not_specific>
drupal_host
<not_specific>