Class: Delayed::Backend::Sequel::Job

Inherits:
Object
  • Object
show all
Defined in:
lib/delayed/backend/sequel.rb

Class Method Summary collapse

Class Method Details

.createLazyJobObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/delayed/backend/sequel.rb', line 10

def self.createLazyJob()
  eval <<-eos
        class LazyJob < ::Sequel::Model(:delayed_jobs)
          include Delayed::Backend::Base
          include Delayed::Backend::Sequel::LazyJob


          class <<self
            alias :create! :create
          end

          alias :save! :save
          alias :update_attributes :update

        end

  eos
  Class.new(LazyJob)
end

.LazyJobObject



6
7
8
# File 'lib/delayed/backend/sequel.rb', line 6

def self.LazyJob
  @@LazyJob ||= self.createLazyJob()
end

.method_missing(sym, *args, &block) ⇒ Object



31
32
33
# File 'lib/delayed/backend/sequel.rb', line 31

def method_missing(sym, *args, &block)
  self.LazyJob.send sym, *args, &block
end

.new(options) ⇒ Object



36
37
38
# File 'lib/delayed/backend/sequel.rb', line 36

def self.new(options)
  self.LazyJob.new(options)
end