Class: Que::Adapters::Sequel
Instance Method Summary collapse
- #checkout(&block) ⇒ Object
-
#initialize(db) ⇒ Sequel
constructor
A new instance of Sequel.
- #wake_worker_after_commit ⇒ Object
Methods inherited from Base
#cleanup!, #execute, #in_transaction?
Constructor Details
#initialize(db) ⇒ Sequel
Returns a new instance of Sequel.
6 7 8 9 |
# File 'lib/que/adapters/sequel.rb', line 6 def initialize(db) @db = db super end |
Instance Method Details
#checkout(&block) ⇒ Object
11 12 13 |
# File 'lib/que/adapters/sequel.rb', line 11 def checkout(&block) @db.synchronize(&block) end |
#wake_worker_after_commit ⇒ Object
15 16 17 |
# File 'lib/que/adapters/sequel.rb', line 15 def wake_worker_after_commit @db.after_commit { Que.wake! } end |