<commit_before>class SshZipFileCreator < ZipFileCreator

  def create_zip
    zip
    download_zip_from_remote_server
    remove_zip_file_on_remote_server
    chmod
  end

  def zip
    server.execute("zip -j #{remote_zip_name} #{shell_escaped_files_to_zip.join(' ')}")
  end

  def download_zip_from_remote_server
    server.copy_from_server([remote_zip_name], zipfile_name_and_path)
  end

  def remote_zip_name
    File.join("#{server.tf_dir}", "logs_and_demos_#{reservation.id}.zip")
  end

  def remove_zip_file_on_remote_server
    server.execute("rm #{remote_zip_name}")
  end

end
<commit_msg>add some logging when downloading zip over SSH<commit_after>class SshZipFileCreator < ZipFileCreator

  def create_zip
    zip
    download_zip_from_remote_server
    remove_zip_file_on_remote_server
    chmod
  end

  def zip
    server.execute("zip -j #{remote_zip_name} #{shell_escaped_files_to_zip.join(' ')}")
  end

  def download_zip_from_remote_server
    Rails.logger.info "[#{Time.now}] Downloading #{remote_zip_name} from #{server.name}"
    server.copy_from_server([remote_zip_name], zipfile_name_and_path)
  end

  def remote_zip_name
    File.join("#{server.tf_dir}", "logs_and_demos_#{reservation.id}.zip")
  end

  def remove_zip_file_on_remote_server
    server.execute("rm #{remote_zip_name}")
  end

end

{'fraction_non_alphanumeric': 0.09138972809667674, 'fraction_numerical': 0.0, 'mean_word_length': 4.8628318584070795, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3381374', 'n_tokens_mistral': 485, 'n_tokens_neox': 471, 'n_words': 79}