Class: Que::Adapters::Sequel

Inherits:
Base
  • Object
show all
Defined in:
lib/que/adapters/sequel.rb

Instance Method Summary collapse

Methods inherited from Base

#execute, #in_transaction?

Constructor Details

#initialize(db) ⇒ Sequel

Returns a new instance of Sequel.



4
5
6
7
# File 'lib/que/adapters/sequel.rb', line 4

def initialize(db)
  @db = db
  super
end

Instance Method Details

#checkout(&block) ⇒ Object



9
10
11
# File 'lib/que/adapters/sequel.rb', line 9

def checkout(&block)
  @db.synchronize(&block)
end

#wake_worker_after_commitObject



13
14
15
# File 'lib/que/adapters/sequel.rb', line 13

def wake_worker_after_commit
  @db.after_commit { Que.wake! }
end