<commit_before>class GetBack::AwsArchivesController < ApplicationController
  def fetch
    @archive = GlacierArchive.find(params[:archive_id])
    @archive.fetch_archive if @archive
    render :partial => 'glacier_archive', :collection => GlacierArchive.all, :as => :archive
  end

  def restore
    @archive = GlacierArchive.find(params[:archive_id])
    if @archive.restore
      render :js => "flash.set('confirm_message', 'database restored to #{@archive.created_at.to_date.to_s(:default)}');flash.notify();"
    else
      render :js => "flash.set('error_message', 'database restore failed');flash.notify();"
    end
  end
end<commit_msg>fixes bugs in aws_archives_controller<commit_after>class GetBack::AwsArchivesController < ApplicationController
  def fetch
    @archive = GlacierArchive.find(params[:archive_id])
    @archive.fetch_archive if @archive
    render :partial => 'get_back/aws_archive_retrieval_jobs/glacier_archive', :collection => GlacierArchive.all, :as => :archive
  end

  def restore
    @archive = GlacierArchive.find(params[:archive_id])
    if @archive.restore_compressed
      render :js => "flash.set('confirm_message', 'database restored to #{@archive.created_at.to_date.to_s(:default)}');flash.notify();"
    else
      render :js => "flash.set('error_message', 'database restore failed');flash.notify();"
    end
  end
end
{'fraction_non_alphanumeric': 0.1309786607799853, 'fraction_numerical': 0.0, 'mean_word_length': 5.071428571428571, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3949330', 'n_tokens_mistral': 420, 'n_tokens_neox': 411, 'n_words': 84}