Class: PatientHttp::SolidQueue::LifecycleHooks
- Inherits:
-
Object
- Object
- PatientHttp::SolidQueue::LifecycleHooks
- Defined in:
- lib/patient_http/solid_queue/lifecycle_hooks.rb
Overview
Registers lifecycle hooks with SolidQueue to start/stop the async HTTP processor.
Class Method Summary collapse
Class Method Details
.register ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/patient_http/solid_queue/lifecycle_hooks.rb', line 10 def register return if @registered ::SolidQueue.on_worker_start { PatientHttp::SolidQueue.start } ::SolidQueue.on_worker_stop { PatientHttp::SolidQueue.stop } @registered = true end |