<commit_before>class PremiumAnalyticsWorker
  include Sidekiq::Worker

  def perform(id, account_type)
    @user = User.find(id)
    if account_type == 'trial'
      analytics = BeganTrialAnalytics.new
    elsif account_type == 'paid'
      analytics = BeganPremiumAnalytics.new
    end
    # tell segment.io
    analytics.track(@user)
  end
end<commit_msg>fixes premium analytics worker error<commit_after>class PremiumAnalyticsWorker
  include Sidekiq::Worker

  def perform(id, account_type)
    @user = User.find(id)
    if account_type == 'paid'
      analytics = BeganPremiumAnalytics.new
    else
      # this is a a bit of a misnomer as free-contributor and free low-income
      # go here as well
      analytics = BeganTrialAnalytics.new
    end
    # tell segment.io
    analytics.track(@user)
  end
end
{'fraction_non_alphanumeric': 0.07616707616707617, 'fraction_numerical': 0.0, 'mean_word_length': 3.2670157068062826, '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': '2351468', 'n_tokens_mistral': 259, 'n_tokens_neox': 253, 'n_words': 68}