Skip to content

Commit

Permalink
fix: do not serialize adapter object (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
roelbondoc authored Jul 15, 2024
1 parent 301f6d9 commit f724ebf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/honeybadger/notification_subscriber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ def process?(event, payload)
class ActiveJobSubscriber < NotificationSubscriber
def format_payload(payload)
job = payload[:job]
payload.except(:job).merge({
job_class: job.class,
adapter = payload[:adapter]
payload.except(:job, :adapter).merge({
adapter_class: adapter.class.to_s,
job_class: job.class.to_s,
job_id: job.job_id,
queue_name: job.queue_name
})
Expand All @@ -87,7 +89,7 @@ class ActiveJobMetricsSubscriber < NotificationSubscriber

def format_payload(payload)
{
job_class: payload[:job].class,
job_class: payload[:job].class.to_s,
queue_name: payload[:job].queue_name
}
end
Expand Down

0 comments on commit f724ebf

Please sign in to comment.