mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-13 04:36:00 +08:00
Fix NewRelic ignore calls for ActiveJobs [SCI-11212] (#7988)
This commit is contained in:
parent
9c524d8e0e
commit
1939902eb1
4 changed files with 5 additions and 6 deletions
|
@ -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|
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue