<commit_before>class AddUserToAirtablesJob < ActiveJob::Base
  queue_as :default

  def perform(user)
    @user = user
    @airtable = setup_airtable

    if user_exists?
      Rails.logger.info "User with email '#{@user.email}' already exists in airtables"
      return
    end

    @airtable.create(
      email: @user.email,
      zip: @user.zip,
      latitude: @user.latitude.to_s,
      longitude: @user.longitude.to_s,
      created_at: @user.created_at,
      updated_at: @user.updated_at
    )<commit_msg>Airtables expects a float<commit_after>class AddUserToAirtablesJob < ActiveJob::Base
  queue_as :default

  def perform(user)
    @user = user
    @airtable = setup_airtable

    if user_exists?
      Rails.logger.info "User with email '#{@user.email}' already exists in airtables"
      return
    end

    result = @airtable.create(
      email: @user.email,
      zip: @user.zip,
      latitude: @user.latitude,
      longitude: @user.longitude,
      created_at: @user.created_at,
      updated_at: @user.updated_at
    )
    Rails.logger.info "User created. Returned: #{result}"
    result
{'fraction_non_alphanumeric': 0.10469314079422383, 'fraction_numerical': 0.0, 'mean_word_length': 2.918727915194346, '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': '7042426', 'n_tokens_mistral': 375, 'n_tokens_neox': 365, 'n_words': 84}