Class: Daemon::MasterProcess::Check
- Inherits:
-
Object
- Object
- Daemon::MasterProcess::Check
- Defined in:
- lib/onapp/engine/master_process/middleware/check.rb
Instance Method Summary (collapse)
- - (Object) call(env)
-
- (Check) initialize(app)
constructor
A new instance of Check.
Constructor Details
- (Check) initialize(app)
Returns a new instance of Check
4 5 6 |
# File 'lib/onapp/engine/master_process/middleware/check.rb', line 4 def initialize(app) @app = app end |
Instance Method Details
- (Object) call(env)
8 9 10 11 12 13 14 15 16 |
# File 'lib/onapp/engine/master_process/middleware/check.rb', line 8 def call(env) pid = env.another_instance_pid if pid env.logger.warn("Another master process running: #{pid}. Exiting...") else @app.call(env) end end |