<commit_before>class HelpdeskController < ApplicationController
  before_action :init

  def init
    time = Time.zone.now
    @start_time = time.beginning_of_day
    @end_time = time.end_of_day
    @team = Team.find_by_name('Helpdesk')
    @contacts_service = ContactsService.new(@team, @start_time, @end_time)
    @agent_statuses = AgentStatus.joins(:agent).where(open: true, agents: { team_id: @team.id })
  end

  def free_agents
    @agent_statuses.where(status: ['Sisäänkirjaus', 'Sisäänkirjautuminen'])
  end

  def queuer_length
    @contacts_service.queue_contacts.length<commit_msg>fix tpyo<commit_after>class HelpdeskController < ApplicationController
  before_action :init

  def init
    time = Time.zone.now
    @start_time = time.beginning_of_day
    @end_time = time.end_of_day
    @team = Team.find_by_name('Helpdesk')
    @contacts_service = ContactsService.new(@team, @start_time, @end_time)
    @agent_statuses = AgentStatus.joins(:agent).where(open: true, agents: { team_id: @team.id })
  end

  def free_agents
    @agent_statuses.where(status: ['Sisäänkirjaus', 'Sisäänkirjautuminen'])
  end

  def queue_length
    @contacts_service.queue_contacts.length
{'fraction_non_alphanumeric': 0.10696095076400679, 'fraction_numerical': 0.0, 'mean_word_length': 4.723300970873787, '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': '2350079', 'n_tokens_mistral': 425, 'n_tokens_neox': 416, 'n_words': 70}