lib/cassandra_object/associations.rb in sessionm-cassandra_object-2.5.1 vs lib/cassandra_object/associations.rb in sessionm-cassandra_object-2.5.2
- old
+ new
@@ -36,11 +36,11 @@
end
end
def remove(key)
begin
- ActiveSupport::Notifications.instrument("remove.cassandra_object", column_family: relationships_column_family, key: key) do
- CassandraObject::Base.with_connection do
+ CassandraObject::Base.with_connection(key) do
+ ActiveSupport::Notifications.instrument("remove.cassandra_object", column_family: relationships_column_family, key: key) do
connection.remove(relationships_column_family, key.to_s, consistency: thrift_write_consistency)
end
end
rescue Cassandra::AccessError => e
raise e unless e.message =~ /Invalid column family/