Class: Delayed::Web::Job

Inherits:
Object
  • Object
show all
Extended by:
SingleForwardable
Defined in:
app/models/delayed/web/job.rb

Defined Under Namespace

Classes: ActiveRecord, Double, Mongoid

Class Method Summary collapse

Class Method Details

.backendObject



23
24
25
# File 'app/models/delayed/web/job.rb', line 23

def self.backend
  @backend
end

.backend=(new_backend) ⇒ void

This method returns an undefined value.

Set the backend you’re using for Delayed::Job.

Example:

Delayed::Web::Job.backend = :active_record

Parameters:

  • new_backend (String)

    “active_record” or “double”.



19
20
21
# File 'app/models/delayed/web/job.rb', line 19

def self.backend= new_backend
  @backend = "Delayed::Web::Job::#{new_backend.classify}".constantize
end