Fix NewRelic ignore calls for ActiveJobs [SCI-11212] (#7988)

This commit is contained in:
Alex Kriuchykhin 2024-10-24 13:22:21 +02:00 committed by GitHub
parent 9c524d8e0e
commit 1939902eb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 6 deletions

View file

@ -2,9 +2,8 @@
module MyModules
class DueDateReminderJob < ApplicationJob
newrelic_ignore
def perform
NewRelic::Agent.ignore_transaction
my_modules = MyModule.uncomplete.approaching_due_dates
my_modules.each do |task|

View file

@ -1,9 +1,8 @@
# frozen_string_literal: true
class NotificationCleanupJob < ApplicationJob
newrelic_ignore
def perform
NewRelic::Agent.ignore_transaction
Notification.where('created_at < ?', 3.months.ago).delete_all
end
end

View file

@ -1,11 +1,10 @@
# frozen_string_literal: true
class RepositoryItemDateReminderJob < ApplicationJob
newrelic_ignore
queue_as :default
def perform
NewRelic::Agent.ignore_transaction
process_repository_values(RepositoryDateTimeValue, DateTime.current)
process_repository_values(RepositoryDateValue, Date.current)
end

View file

@ -1,5 +1,7 @@
# frozen_string_literal: true
require 'newrelic_rpm'
class TemplatesService
def initialize(base_dir = nil)
@base_dir = base_dir ? base_dir : "#{Rails.root}/app/assets/templates"