Method: CacheDebugging::Utils.publish_notification

Defined in:
lib/cache_debugging/utils.rb

.publish_notification(name, extra = {}) ⇒ Object

wrapper for ActiveSupport::Notification publish



21
22
23
24
25
26
27
28
29
# File 'lib/cache_debugging/utils.rb', line 21

def self.publish_notification(name, extra = {})
  ActiveSupport::Notifications.publish(
    name, 
    Time.now,             # not a block, so fake the start time
    Time.now,             # not a block, so fake the finish time
    SecureRandom.hex(10), # generate a unique id
    extra
  )
end