<commit_before>require "mail"

class ActionMailroom::InboundEmail < ActiveRecord::Base
  self.table_name = "action_mailroom_inbound_emails"

  has_one_attached :raw_email

  enum status: %i[ pending processing delivered failed bounced ]

  after_create_commit :deliver_to_mailroom_later


  def mail
    @mail ||= Mail.new(Mail::Utilities.binary_unsafe_to_crlf(raw_email.download))
  end

  private
    def deliver_to_mailroom_later
      ActionMailroom::DeliverInboundEmailToMailroomJob.perform_later self
    end
end<commit_msg>Save this for a little later<commit_after>require "mail"

class ActionMailroom::InboundEmail < ActiveRecord::Base
  self.table_name = "action_mailroom_inbound_emails"

  has_one_attached :raw_email

  enum status: %i[ pending processing delivered failed bounced ]

  # after_create_commit :deliver_to_mailroom_later


  def mail
    @mail ||= Mail.new(Mail::Utilities.binary_unsafe_to_crlf(raw_email.download))
  end

  private
    def deliver_to_mailroom_later
      ActionMailroom::DeliverInboundEmailToMailroomJob.perform_later self
    end
end
{'fraction_non_alphanumeric': 0.06778087279480037, 'fraction_numerical': 0.0, 'mean_word_length': 5.613496932515337, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5703564', 'n_tokens_mistral': 361, 'n_tokens_neox': 338, 'n_words': 66}