app/models/top_image/rebuilder.rb
# NOTE - this is probably not a good idea. NOTE - this actually also handles
# top_unpublished_images. TODO - instead, we should probably handle these
# during harvests, replacing candidates as required. More thoughts in the
# comment where this method is invoked in Manager.
this is probably not a good idea. NOTE - this actually also handles
top_unpublished_images. TODO - instead, we should probably handle these
during harvests, replacing candidates as required. More thoughts in the
comment where this method is invoked in Manager.
this is probably not a good idea . NOTE - this actually also handles top_unpublished_images . TODO - instead we should probably handle these during harvests replacing candidates as required . More thoughts in the comment where this method is invoked in Manager .
def old_rebuild
      EOL.log_call
      get_image_data_objects
      build_baseline_concept_images
      build_baseline_hierarchy_entries
      build_sortable_hashes
      TopImage.connection.transaction do
        EOL::Db.with_tmp_tables([TopImage, TopUnpublishedImage]) do
          bulk_insert_tmp_images(@top_images, @top_unpublished_images)
          bulk_insert_clade_cascades
          EOL::Db.swap_tmp_table(TopImage)
          EOL::Db.swap_tmp_table(TopUnpublishedImage)
          build_species_table_from("top_images", "top_species_images")
          build_species_table_from("top_unpublished_images",
            "top_unpublished_species_images")
        end
      end
    end
def old_rebuild EOL . log_call get_image_data_objects build_baseline_concept_images build_baseline_hierarchy_entries build_sortable_hashes TopImage . connection . transaction do EOL :: Db . with_tmp_tables ( [ TopImage , TopUnpublishedImage ] ) do bulk_insert_tmp_images ( @top_images , @top_unpublished_images ) bulk_insert_clade_cascades EOL :: Db . swap_tmp_table ( TopImage ) EOL :: Db . swap_tmp_table ( TopUnpublishedImage ) build_species_table_from ( "top_images" , "top_species_images" ) build_species_table_from ( "top_unpublished_images" , "top_unpublished_species_images" ) end end end
NOTE - this is probably not a good idea.
NOTE - this is probably not a good idea .
# TODO - more logging