Class: ActiveJob::Uniqueness::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- ActiveJob::Uniqueness::LogSubscriber
- Defined in:
- lib/active_job/uniqueness/log_subscriber.rb
Overview
:nodoc:
Instance Method Summary collapse
- #conflict(event) ⇒ Object
- #lock(event) ⇒ Object
- #runtime_conflict(event) ⇒ Object
- #runtime_lock(event) ⇒ Object
- #runtime_unlock(event) ⇒ Object
- #unlock(event) ⇒ Object
Instance Method Details
#conflict(event) ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/active_job/uniqueness/log_subscriber.rb', line 44 def conflict(event) job = event.payload[:job] resource = event.payload[:resource] info do "Not unique #{lock_info(job, resource)}" + args_info(job) end end |
#lock(event) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/active_job/uniqueness/log_subscriber.rb', line 8 def lock(event) job = event.payload[:job] resource = event.payload[:resource] debug do "Locked #{lock_info(job, resource)}" + args_info(job) end end |
#runtime_conflict(event) ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/active_job/uniqueness/log_subscriber.rb', line 53 def runtime_conflict(event) job = event.payload[:job] resource = event.payload[:resource] info do "Not unique runtime #{lock_info(job, resource)}" + args_info(job) end end |
#runtime_lock(event) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/active_job/uniqueness/log_subscriber.rb', line 17 def runtime_lock(event) job = event.payload[:job] resource = event.payload[:resource] debug do "Locked runtime #{lock_info(job, resource)}" + args_info(job) end end |
#runtime_unlock(event) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/active_job/uniqueness/log_subscriber.rb', line 35 def runtime_unlock(event) job = event.payload[:job] resource = event.payload[:resource] debug do "Unlocked runtime #{lock_info(job, resource)}" end end |
#unlock(event) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/active_job/uniqueness/log_subscriber.rb', line 26 def unlock(event) job = event.payload[:job] resource = event.payload[:resource] debug do "Unlocked #{lock_info(job, resource)}" end end |