|
|
@ -18,15 +18,24 @@ module Semantic |
|
|
|
logger.debug("#{name} #{sql}") |
|
|
|
end |
|
|
|
|
|
|
|
def instantiation(event) |
|
|
|
# class_name = event.payload[:class_name] |
|
|
|
# record_count = event.payload[:record_count] |
|
|
|
# logger.debug("instantiate #{class_name} #{record_count} times") |
|
|
|
def start_transaction(event) |
|
|
|
short_uuid = short_uuid(event.payload[:transaction].uuid) |
|
|
|
logger.info("TRANSACTION Begin #{short_uuid}") |
|
|
|
end |
|
|
|
|
|
|
|
def transaction(event) |
|
|
|
outcome = event.payload[:outcome] |
|
|
|
short_uuid = short_uuid(event.payload[:transaction].uuid) |
|
|
|
logger.info("TRANSACTION #{outcome.capitalize} #{short_uuid}") |
|
|
|
end |
|
|
|
|
|
|
|
def instantiation(event); end |
|
|
|
|
|
|
|
def strict_loading_violation(event) = any_hook event |
|
|
|
def start_transaction(event) = any_hook event |
|
|
|
def transaction(event) = any_hook event |
|
|
|
|
|
|
|
private |
|
|
|
|
|
|
|
def short_uuid(uuid) = uuid.split('-').first |
|
|
|
end |
|
|
|
end |
|
|
|
end |