Class: Appsignal::IPC::Server
- Inherits:
-
Object
- Object
- Appsignal::IPC::Server
- Defined in:
- lib/appsignal/ipc.rb
Class Attribute Summary collapse
-
.uri ⇒ Object
readonly
Returns the value of attribute uri.
Class Method Summary collapse
Class Attribute Details
.uri ⇒ Object (readonly)
Returns the value of attribute uri.
15 16 17 |
# File 'lib/appsignal/ipc.rb', line 15 def uri @uri end |
Class Method Details
.enqueue(transaction) ⇒ Object
34 35 36 37 |
# File 'lib/appsignal/ipc.rb', line 34 def enqueue(transaction) Appsignal.logger.debug("Receiving transaction #{transaction.request_id} in IPC server") Appsignal.enqueue(transaction) end |
.start ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/appsignal/ipc.rb', line 17 def start local_tmp_path = File.join(Appsignal.config.root_path, 'tmp') if File.exists?(local_tmp_path) @uri = 'drbunix:' + File.join(local_tmp_path, "appsignal-#{Process.pid}") else @uri = "drbunix:/tmp/appsignal-#{Process.pid}" end Appsignal.logger.info("Starting IPC server, listening on #{uri}") DRb.start_service(uri, Appsignal::IPC::Server) end |