Module: Switchman::Shackles::Relation

Defined in:
lib/switchman/shackles/relation.rb

Instance Method Summary collapse

Instance Method Details

#exec_queries(*args) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/switchman/shackles/relation.rb', line 4

def exec_queries(*args)
  if self.lock_value
    db = Shard.current(shard_category).database_server
    if ::Shackles.environment != db.shackles_environment
      return db.unshackle { super }
    end
  end
  super
end