<commit_before>discourse = Discourse.new

projects = Project.approved
                  .joins(:contestants)
                  .where(contestants: { edition: Edition.get_current })
                  .distinct

projects.each do |project|
  project.comments_count = discourse.replies_count(project.topic_id)
  project.save!
end

talks = Talk.where(edition: Edition.get_current)

talks.each do |talk|
  talk.comments_count = discourse.replies_count(talk.topic_id)
  talk.save!
end<commit_msg>Update comments count without triggering forum topic update<commit_after>discourse = Discourse.new

projects = Project.approved
                  .joins(:contestants)
                  .where(contestants: { edition: Edition.get_current })
                  .distinct

projects.each do |project|
  project.update_column(:comments_count,
                        discourse.replies_count(project.topic_id))
end

talks = Talk.where(edition: Edition.get_current)

talks.each do |talk|
  talk.update_column(:comments_count, discourse.replies_count(talk.topic_id))
end
{'fraction_non_alphanumeric': 0.09342230695900858, 'fraction_numerical': 0.0, 'mean_word_length': 3.1338582677165356, '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': '70648', 'n_tokens_mistral': 320, 'n_tokens_neox': 310, 'n_words': 56}