<commit_before>class SiteBannerLookup < ActiveRecord::Base
  belongs_to :channel
  belongs_to :publisher
  def set_sha2_base16
    self.sha2_base16 = Digest::SHA2.hexdigest(channel_identifier)
  end
end<commit_msg>SiteBannerLookup reads from other database (#2903)<commit_after>class SiteBannerLookup < ActiveRecord::Base
  belongs_to :channel
  belongs_to :publisher

  connects_to database: { writing: :primary, reading: :secondary }

  def set_sha2_base16
    self.sha2_base16 = Digest::SHA2.hexdigest(channel_identifier)
  end
end
{'fraction_non_alphanumeric': 0.07677902621722846, 'fraction_numerical': 0.033707865168539325, 'mean_word_length': 6.22972972972973, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7535220', 'n_tokens_mistral': 184, 'n_tokens_neox': 175, 'n_words': 36}