You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: equipment_life_progress_check_job.rb
    path of file: ./repos/ekylibre/app/jobs
    
    the code of the file until where you have to start completion: class EquipmentLifeProgressCheckJob < ScheduleJob
  queue_as :low

  def perform_on_tenant
    alert_ratio = 0.85 # Ratio over 1, not 100%

    ratios = Hash.new { Hash.new(alert_ratio) }

    # Equipments whose lifespan is under alert ratio
    lifeworn_equipments = Equipment.select do |e|
      e.lifespan_progress > ratios[:equip][:life]
    end

    # Equipments whose working_lifespan is under alert ratio
    workworn_equipments = Equipment.select do |e|
      e.working_lifespan_progress > ratios[:equip][:work]
    end

    lifeworn_equipme
    
  def perform_on_tenant
    alert_ratio = 0.85 # Ratio over 1, not 100%

    ratios = Hash.new { Hash.new(alert_ratio) }

    # Equipments whose lifespan is under alert ratio
    lifeworn_equipments = Equipment.select do |e|
      e.lifespan_progress > ratios[:equip][:life]
    end

    # Equipments whose working_lifespan is under alert ratio
    workworn_equipments = Equipment.select do |e|
      e.working_lifespan_progress > ratios[:equip][:work]
    end

    lifeworn_equipments.each(&:alert_life)
    workworn_equipments.each(&:alert_work)

    worn_equipments = lifeworn_equipments + workworn_equipments

    Equipment.where.not(id: worn_equipments.map(&:id)).each do |equip|
      # Components whose lifespan is under alert ratio
      lifeworn_components = equip.components.select do |component|
        equip.lifespan_progress_of(component) > ratios[:comp][:life]
      end

      # Components whose working_lifespan is under alert ratio
      workworn_components = equip.components.select do |component|
        equip.working_lifespan_progress_of(component) > ratios[:comp][:work]
      end

      lifeworn_components.each { |c| equip.alert_component_life(c) }
      workworn_components.each { |c| equip.alert_component_work(c) }
    end
  end