Skip to content

Instantly share code, notes, and snippets.

@andrewberls
Created January 28, 2014 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewberls/8660932 to your computer and use it in GitHub Desktop.
Save andrewberls/8660932 to your computer and use it in GitHub Desktop.
class Cassandra
alias :old_insert :insert
def insert(column_family, key, hash, options = {})
puts "Injected! Send AMQP notification here..."
old_insert(column_family, key, hash, options)
end
end
client = Cassandra.new('schema1', '127.0.0.1:9160')
client.insert(:users, "bjean", { 'first' => 'billy', 'last' => 'jean' })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment