Class: Procrastinate::ProcessManager::ObjectEndpoint
- Inherits:
-
Struct
- Object
- Struct
- Procrastinate::ProcessManager::ObjectEndpoint
- Defined in:
- lib/procrastinate/process_manager/object_endpoint.rb
Overview
A class that acts as a filter between ProcessManager and the endpoint it uses to communicate with its children. This converts Ruby objects into Strings and also sends process id.
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#pid ⇒ Object
Returns the value of attribute pid.
Instance Method Summary collapse
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint
5 6 7 |
# File 'lib/procrastinate/process_manager/object_endpoint.rb', line 5 def endpoint @endpoint end |
#pid ⇒ Object
Returns the value of attribute pid
5 6 7 |
# File 'lib/procrastinate/process_manager/object_endpoint.rb', line 5 def pid @pid end |
Instance Method Details
#send(obj) ⇒ Object
6 7 8 9 |
# File 'lib/procrastinate/process_manager/object_endpoint.rb', line 6 def send(obj) msg = Marshal.dump([pid, obj]) endpoint.send(msg) end |