Module: GoodJob::Notifier::ProcessHeartbeat
- Extended by:
- ActiveSupport::Concern
- Included in:
- GoodJob::Notifier
- Defined in:
- lib/good_job/notifier/process_heartbeat.rb
Overview
Extends the Notifier to register the process in the database.
Instance Method Summary collapse
-
#deregister_process ⇒ Object
Deregisters the current process.
- #refresh_process ⇒ Object
-
#register_process ⇒ Object
Registers the current process.
Instance Method Details
#deregister_process ⇒ Object
Deregisters the current process.
34 35 36 37 38 |
# File 'lib/good_job/notifier/process_heartbeat.rb', line 34 def deregister_process GoodJob::Process.override_connection(connection) do @capsule.tracker.unregister(with_advisory_lock: true) end end |
#refresh_process ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/good_job/notifier/process_heartbeat.rb', line 23 def refresh_process Rails.application.executor.wrap do GoodJob::Process.override_connection(connection) do GoodJob::Process.with_logger_silenced do @capsule.tracker.renew end end end end |