Module: AnyCable::Rails::SocketIdTrackingJob
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/anycable/rails/socket_id_tracking.rb
Instance Attribute Summary collapse
-
#cable_socket_id ⇒ Object
Returns the value of attribute cable_socket_id.
Instance Method Summary collapse
Instance Attribute Details
#cable_socket_id ⇒ Object
Returns the value of attribute cable_socket_id.
22 23 24 |
# File 'lib/anycable/rails/socket_id_tracking.rb', line 22 def cable_socket_id @cable_socket_id end |
Instance Method Details
#deserialize(job_data) ⇒ Object
30 31 32 33 |
# File 'lib/anycable/rails/socket_id_tracking.rb', line 30 def deserialize(job_data) super self.cable_socket_id = job_data["cable_socket_id"] end |
#serialize ⇒ Object
24 25 26 27 28 |
# File 'lib/anycable/rails/socket_id_tracking.rb', line 24 def serialize return super unless Rails.current_socket_id super.merge("cable_socket_id" => Rails.current_socket_id) end |