<commit_before># encoding: utf-8
require_relative './base_job'
require 'resque-metrics'

module Resque
  module UserJobs

    module Signup

      module NewUser
        @queue = :users

        def self.perform(user_creation_id, common_data_url=nil, organization_owner_promotion=false)
          user_creation = Carto::UserCreation.where(id: user_creation_id).first
          user_creation.set_common_data_url(common_data_url) unless common_data_url.nil?
          user_creation.set_owner_promotion(organization_owner_promotion)
          user_creation.next_creation_step! until user_creation.finished?
        end

      end

    end

    module SyncTables

      module LinkGhostTables
        extend ::Resque::Metrics
        @queue = :users

        def self.perform(user_id)
          u = User.where(id: user_id).first
          u.link_ghost_tables
        end

      end

    end


    module CommonData
      module LoadCommonData
        @queue = :users

        def self.perform(user_id, visualizations_api_url)
          User.where(id: user_id).first.load_common_data(visualizations_api_url)
        end
      end

    end


    module Mail

      module NewOrganizationUser
        extend ::Resque::Metrics
        @queue = :users
<commit_msg>Log exceptions in LinkGhostTables #5464<commit_after># encoding: utf-8
require_relative './base_job'
require 'resque-metrics'
require_relative '../cartodb/metrics'

module Resque
  module UserJobs

    module Signup

      module NewUser
        @queue = :users

        def self.perform(user_creation_id, common_data_url=nil, organization_owner_promotion=false)
          user_creation = Carto::UserCreation.where(id: user_creation_id).first
          user_creation.set_common_data_url(common_data_url) unless common_data_url.nil?
          user_creation.set_owner_promotion(organization_owner_promotion)
          user_creation.next_creation_step! until user_creation.finished?
        end

      end

    end

    module SyncTables

      module LinkGhostTables
        extend ::Resque::Metrics
        @queue = :users

        def self.perform(user_id)
          u = User.where(id: user_id).first
          u.link_ghost_tables
        rescue => e
          CartoDB.notify_exception(e)
          raise e
        end

      end

    end


    module CommonData
      module LoadCommonData
        @queue = :users

        def self.perform(user_id, visualizations_api_url)
          User.where(id: user_id).first.load_common_data(visualizations_api_url)
        end
      end

    end


    module Mail

      module NewOrganizationUser
        extend ::Resque::Metrics
        @queue = :users

{'fraction_non_alphanumeric': 0.06641509433962264, 'fraction_numerical': 0.0022641509433962265, 'mean_word_length': 2.5066137566137567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2937103', 'n_tokens_mistral': 820, 'n_tokens_neox': 763, 'n_words': 157}