app/models/post/mirror_methods.rb
# On :normal, upload all files to all mirrors except :previews_only ones.
# On :previews_only, upload previews to previews_only mirrors.
On :normal, upload all files to all mirrors except :previews_only ones.
On :previews_only, upload previews to previews_only mirrors.
On : normal upload all files to all mirrors except : previews_only ones . On : previews_only upload previews to previews_only mirrors .
def upload_to_mirrors
    return if is_warehoused
    return if status == "deleted"
    begin
      upload_to_mirrors_internal(:normal)
      upload_to_mirrors_internal(:previews_only)
    rescue Mirrors::MirrorError
      reload
      raise if status != "deleted"
      return
    end
    reload
    update(:is_warehoused => true)
  end
def upload_to_mirrors return if is_warehoused return if status == "deleted" begin upload_to_mirrors_internal ( :normal ) upload_to_mirrors_internal ( :previews_only ) rescue Mirrors :: MirrorError reload raise if status != "deleted" return end reload update ( :is_warehoused => true ) end
On :normal, upload all files to all mirrors except :previews_only ones.
On : normal upload all files to all mirrors except : previews_only ones .
# The post might be deleted while it's uploading.  Check the post status after # an error. # This might take a while.  Rather than hold a transaction, just reload the post # after uploading.