<commit_before># This task is owned by a Build
class Task::Test < Task
  states :created, :started, :cloned, :installed, :finished

  event :start,  :to => :started, :after => :propagate
  event :finish, :to => :finished, :after => :propagate

  def finish(data)
    self.status = data[:status]
  end

  protected

    def extract_finishing_attributes(attributes)
      extract!(attributes, :finished_at)
    end
end<commit_msg>fix task::test to actually store the status<commit_after># This task is owned by a Build
class Task::Test < Task
  states :created, :started, :cloned, :installed, :finished

  event :start,  :to => :started, :after => :propagate
  event :finish, :to => :finished, :after => :propagate

  def finish(data)
    self.status, self.finished_at = *data.values_at(:status, :finished_at)
  end

  protected

    def extract_finishing_attributes(attributes)
      extract!(attributes, :finished_at, :status)
    end
end
{'fraction_non_alphanumeric': 0.12153518123667377, 'fraction_numerical': 0.0, 'mean_word_length': 4.3352272727272725, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '5539820', 'n_tokens_mistral': 304, 'n_tokens_neox': 285, 'n_words': 90}