diff --git a/Gemfile b/Gemfile index 893eb528..b4352fa7 100644 --- a/Gemfile +++ b/Gemfile @@ -44,7 +44,6 @@ gem 'turbo-rails' gem 'twitter_cldr', require: false gem 'tzinfo-data' -gem 'activejob-uniqueness' gem 'airbrake' gem 'newrelic_rpm' diff --git a/Gemfile.lock b/Gemfile.lock index 566689b5..52baffbd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,9 +47,6 @@ GEM activejob (8.0.1) activesupport (= 8.0.1) globalid (>= 0.3.6) - activejob-uniqueness (0.4.0) - activejob (>= 4.2, < 8.1) - redlock (>= 2.0, < 3) activemodel (8.0.1) activesupport (= 8.0.1) activerecord (8.0.1) @@ -446,8 +443,6 @@ GEM psych (>= 4.0.0) redis-client (0.23.0) connection_pool - redlock (2.0.6) - redis-client (>= 0.14.1, < 1.0.0) regexp_parser (2.9.3) reline (0.6.0) io-console (~> 0.5) @@ -599,7 +594,6 @@ PLATFORMS x86_64-linux-musl DEPENDENCIES - activejob-uniqueness airbrake annotaterb arabic-letter-connector diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e8746357..3f354512 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,7 +12,6 @@ class ApplicationController < ActionController::Base # before_action :sign_in_for_demo, if: -> { Docuseal.demo? } before_action :maybe_redirect_to_setup, unless: :signed_in? before_action :authenticate_user!, unless: :devise_controller? - # before_action :newrelic_metadata helper_method :button_title, :current_account, @@ -158,11 +157,4 @@ class ApplicationController < ActionController::Base redirect_to request.url.gsub('.co/', '.com/'), allow_other_host: true, status: :moved_permanently end - - # Add to this as required! - # def newrelic_metadata - # ::NewRelic::Agent.add_custom_attributes( - # user_id: current_user&.id - # ) - # end end diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index 4c38234e..093e80b6 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,21 +1,5 @@ # frozen_string_literal: true -require 'benchmark' - class ApplicationJob < ActiveJob::Base - include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation - unique :while_executing, on_conflict: :log - retry_on StandardError, wait: 6.seconds, attempts: 5 unless Docuseal.multitenant? - - def perform(*args) - receiver_str, _, message = args.shift.rpartition('.') - time = Benchmark.measure do - receiver_str.constantize.send(message, *args) - end - Rails.logger.info( - "Finished #{receiver_str}.#{message}(#{args.map(&:to_s).join(', ')}): #{time}" - ) - end - add_transaction_tracer :perform, category: :task end