Skip to content

Commit 2211451

Browse files
committed
update method name
1 parent 5a771ee commit 2211451

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/jobs/application_job.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@ class ApplicationJob < ActiveJob::Base
22
attr_reader :request_id
33

44
before_enqueue do
5-
self.arguments << { request_id: Current.request_id }
5+
arguments << { request_id: Current.request_id }
66
end
77

88
around_perform do |job, block|
99
@request_id = job.arguments.pop[:request_id] || ''
1010
block.call
1111
end
1212

13-
around_perform :log_activejob_id
13+
around_perform :log_job_metadata
1414

1515
def today
1616
@today ||= Time.zone.now.strftime('%Y%m%d')
1717
end
1818

19-
# AP-186: Add the ActiveJob ID to job logs
20-
def log_activejob_id
19+
def log_job_metadata
2120
logger.with_fields = { activejob_id: job_id, request_id: @request_id }
2221
yield
2322
end

0 commit comments

Comments
 (0)