Class: Etna::SynchronizeDb
- Inherits:
-
Object
- Object
- Etna::SynchronizeDb
- Defined in:
- lib/etna/synchronize_db.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ SynchronizeDb
constructor
A new instance of SynchronizeDb.
Constructor Details
#initialize(app) ⇒ SynchronizeDb
Returns a new instance of SynchronizeDb.
3 4 5 |
# File 'lib/etna/synchronize_db.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/etna/synchronize_db.rb', line 7 def call(env) # Do a coarse checkout of the connection Etna::Application.instance.db.synchronize do @app.call(env) end end |