<commit_before># frozen_string_literal: true

module Thredded
  class AutoFollowAndNotifyJob < ::ActiveJob::Base
    queue_as :default

    def perform(post_id)
      post = Thredded::Post.find(post_id)

      Thredded::AutofollowUsers.new(post).run<commit_msg>Skip AutoFollowAndNotifyJob if the post is gone<commit_after># frozen_string_literal: true

module Thredded
  class AutoFollowAndNotifyJob < ::ActiveJob::Base
    queue_as :default

    def perform(post_id)
      post = Thredded::Post.find_by(id: post_id)
      return if post.nil? || post.postable.nil?

      Thredded::AutofollowUsers.new(post).run
{'fraction_non_alphanumeric': 0.09492635024549918, 'fraction_numerical': 0.0, 'mean_word_length': 4.5636363636363635, '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': '6807736', 'n_tokens_mistral': 203, 'n_tokens_neox': 198, 'n_words': 40}