Class: Signalman::QueryHandler
- Inherits:
-
BaseHandler
- Object
- BaseHandler
- Signalman::QueryHandler
- Defined in:
- lib/signalman.rb
Constant Summary collapse
- IGNORED_QUERIES =
[ "SCHEMA", "TRANSACTION", "ActiveRecord::SchemaMigration", "ActiveRecord::InternalMetadata", /^Signalman/ ]
Instance Attribute Summary
Attributes inherited from BaseHandler
Instance Method Summary collapse
- #process ⇒ Object
-
#skip? ⇒ Boolean
CREATE_TABLE queries have nil for ‘name`.
Methods inherited from BaseHandler
call, #create_event, #finished_at, #initialize, #start, #started_at
Constructor Details
This class inherits a constructor from Signalman::BaseHandler
Instance Method Details
#process ⇒ Object
107 108 109 |
# File 'lib/signalman.rb', line 107 def process create_event event.payload.except(:connection) end |
#skip? ⇒ Boolean
CREATE_TABLE queries have nil for ‘name`
102 103 104 105 |
# File 'lib/signalman.rb', line 102 def skip? return if event.payload[:name].blank? IGNORED_QUERIES.any?{ |q| q.match? event.payload[:name] } end |