Skip to content

Commit

Permalink
Merge pull request #14 from hbda/fix_payload_display_name
Browse files Browse the repository at this point in the history
Для джоб запускаемых через handle_asynchronously не из моделей ActiveRecord display_name генерился как "undefined#method".
  • Loading branch information
zsand authored Sep 6, 2023
2 parents c81cc47 + 0270e16 commit 00e3318
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/delayed/performable_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def initialize(object, method, args)
end

def display_name
return "#{self.object.class}#{method}" unless self.object.is_a?(String)

case self.object
when CLASS_STRING_FORMAT then "#{$1}.#{method}"
when AR_STRING_FORMAT then "#{$1}##{method}"
Expand Down

0 comments on commit 00e3318

Please sign in to comment.