Class: Telephony::Jobs::PusherEvent
- Inherits:
-
Object
- Object
- Telephony::Jobs::PusherEvent
- Defined in:
- lib/telephony/jobs/pusher_event.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Instance Method Summary collapse
- #failure ⇒ Object
-
#initialize(event) ⇒ PusherEvent
constructor
A new instance of PusherEvent.
- #perform ⇒ Object
Constructor Details
#initialize(event) ⇒ PusherEvent
Returns a new instance of PusherEvent.
6 7 8 |
# File 'lib/telephony/jobs/pusher_event.rb', line 6 def initialize(event) @event = event end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
4 5 6 |
# File 'lib/telephony/jobs/pusher_event.rb', line 4 def event @event end |
Instance Method Details
#failure ⇒ Object
14 15 16 17 18 |
# File 'lib/telephony/jobs/pusher_event.rb', line 14 def failure Rails.logger.error "#{self.class}: #{self.as_json}" ActiveSupport::Notifications .instrument("telephony.agent_offline_failure", self) end |
#perform ⇒ Object
10 11 12 |
# File 'lib/telephony/jobs/pusher_event.rb', line 10 def perform Telephony::PusherEventPublisher.push(@event) end |