<commit_before>class JobMessagesController < ApplicationController
  before_filter  :authorize_only_for_admin

  def show
   @job_message = Rails.cache.fetch(params[:job_id])
   respond_to do |format|
     format.json { render 'job_messages/show'}
   end
  end

  def get
    status = ActiveJob::Status.get(params[:job_id])
    if status.working?
      flash_now(:success, t('poll_job.working_message', progress: status[:progress], total: status[:total]))
    else
      if status.queued?
        status_msg = t('poll_job.queued')
      elsif status.completed?
        status_msg = t('poll_job.completed')
      else
        status_msg = t('poll_job.failed')
      end
      flash_now(:success, status_msg)<commit_msg>Use other flash keys for progress status messages<commit_after>class JobMessagesController < ApplicationController
  before_filter  :authorize_only_for_admin

  def show
   @job_message = Rails.cache.fetch(params[:job_id])
   respond_to do |format|
     format.json { render 'job_messages/show'}
   end
  end

  def get
    status = ActiveJob::Status.get(params[:job_id])
    if status.working?
      flash_now(:notice, t('poll_job.working_message', progress: status[:progress], total: status[:total]))
    else
      if status.queued?
        flash_now(:notice,t('poll_job.queued'))
      elsif status.completed?
        flash_now(:success, t('poll_job.completed'))
      else
        flash_now(:error, t('poll_job.failed'))
      end
{'fraction_non_alphanumeric': 0.11080523055746731, 'fraction_numerical': 0.0, 'mean_word_length': 3.6305732484076434, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '662049', 'n_tokens_mistral': 452, 'n_tokens_neox': 440, 'n_words': 91}