<commit_before>class EventImportFileStateMachine
  include Statesman::Machine

  state :pending, initial: true
  state :started
  state :completed
  state :failed

  transition from: :pending, to: :started
  transition from: :started, to: [:completed, :failed]

  before_transition(from: :pending, to: :started) do |event_import_file|
    event_import_file.executed_at = Time.zone.now
  end

  before_transition(from: :started, to: :completed) do |event_import_file|
    event_import_file.error_message = nil
  end
end<commit_msg>fixed setting executed_at<commit_after>class EventImportFileStateMachine
  include Statesman::Machine

  state :pending, initial: true
  state :started
  state :completed
  state :failed

  transition from: :pending, to: :started
  transition from: :started, to: [:completed, :failed]

  before_transition(from: :pending, to: :started) do |event_import_file|
    event_import_file.update_column(:executed_at, Time.zone.now)
  end

  before_transition(from: :started, to: :completed) do |event_import_file|
    event_import_file.error_message = nil
  end
end
{'fraction_non_alphanumeric': 0.09291628334866606, 'fraction_numerical': 0.0, 'mean_word_length': 5.476190476190476, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1075464', 'n_tokens_mistral': 356, 'n_tokens_neox': 331, 'n_words': 89}