<commit_before>module VmOrTemplate::Operations::Relocation
  def raw_live_migrate(_options = nil)
    raise NotImplementedError, _("raw_live_migrate must be implemented in a subclass")
  end

  def live_migrate(options = {})
    raw_live_migrate(options)
  end

  def raw_evacuate(_options = nil)
    raise NotImplementedError, _("raw_evacuate must be implemented in a subclass")
  end

  # Evacuate a VM (i.e. move to another host) as a queued task and return the
  # task id. The queue name and the queue zone are derived from the EMS, and a
  # userid is mandatory.
  #
  def evacuate_queue(userid, options)
    task_opts = {
      :action => "evacuating VM for user #{userid}",
      :userid => userid
    }

    queue_opts = {
      :class_name  => self.class.name,
      :method_name => 'evacuate',
      :instance_id => id,
      :role        => 'ems_operations',
      :queue_name  => queue_name_for_ems_operations,
      :zone        => my_zone,
      :args        => [options]
    }

    MiqTask.generic_action_with_callback(task_opts, queue_opts)
  end<commit_msg>Updated evacutate_queue comments.<commit_after>module VmOrTemplate::Operations::Relocation
  def raw_live_migrate(_options = nil)
    raise NotImplementedError, _("raw_live_migrate must be implemented in a subclass")
  end

  def live_migrate(options = {})
    raw_live_migrate(options)
  end

  def raw_evacuate(_options = nil)
    raise NotImplementedError, _("raw_evacuate must be implemented in a subclass")
  end

  # Evacuate a VM (i.e. move to another host) as a queued task and return the
  # task id. The queue name and the queue zone are derived from the EMS, and
  # both the userid and options are mandatory.
  #
  def evacuate_queue(userid, options)
    task_opts = {
      :action => "evacuating VM for user #{userid}",
      :userid => userid
    }

    queue_opts = {
      :class_name  => self.class.name,
      :method_name => 'evacuate',
      :instance_id => id,
      :role        => 'ems_operations',
      :queue_name  => queue_name_for_ems_operations,
      :zone        => my_zone,
      :args        => [options]
    }

    MiqTask.generic_action_with_callback(task_opts, queue_opts)
  end
{'fraction_non_alphanumeric': 0.09269406392694064, 'fraction_numerical': 0.0, 'mean_word_length': 3.1106941838649154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '669876', 'n_tokens_mistral': 716, 'n_tokens_neox': 709, 'n_words': 196}