Class: CopyTunerClient::ProcessGuard
- Inherits:
-
Object
- Object
- CopyTunerClient::ProcessGuard
- Defined in:
- lib/copy_tuner_client/process_guard.rb
Overview
Starts the poller from a worker process, or register hooks for a spawner process (such as in Unicorn or Passenger). Also registers hooks for exiting processes and completing background jobs. Applications using the client will not need to interact with this class directly.
Instance Method Summary collapse
-
#initialize(cache, poller, options) ⇒ ProcessGuard
constructor
A new instance of ProcessGuard.
-
#start ⇒ Object
Starts the poller or registers hooks.
Constructor Details
#initialize(cache, poller, options) ⇒ ProcessGuard
Returns a new instance of ProcessGuard.
11 12 13 14 15 |
# File 'lib/copy_tuner_client/process_guard.rb', line 11 def initialize(cache, poller, ) @cache = cache @poller = poller @logger = [:logger] end |