Module: Delayed

Defined in:
lib/generators/delayed/migration_generator.rb,
lib/delayed.rb,
lib/delayed/engine.rb,
lib/delayed/plugin.rb,
lib/delayed/worker.rb,
lib/delayed/monitor.rb,
lib/delayed/priority.rb,
lib/delayed/runnable.rb,
lib/delayed/lifecycle.rb,
lib/delayed/psych_ext.rb,
lib/delayed/psych_ext.rb,
app/models/delayed/job.rb,
lib/delayed/exceptions.rb,
lib/delayed/job_wrapper.rb,
lib/delayed/backend/base.rb,
lib/delayed/message_sending.rb,
lib/delayed/active_job_adapter.rb,
lib/delayed/performable_mailer.rb,
lib/delayed/performable_method.rb,
lib/delayed/plugins/connection.rb,
lib/delayed/backend/job_preparer.rb,
lib/generators/delayed/generator.rb,
lib/delayed/plugins/instrumentation.rb,
lib/generators/delayed/next_migration_version.rb

Overview

Extend the DelayedJobGenerator so that it creates an AR migration

Defined Under Namespace

Modules: Backend, DelayMail, MessageSending, MessageSendingClassMethods, NextMigrationVersion, Plugins, PsychExt, Runnable Classes: ActiveJobAdapter, Callback, DelayProxy, DeserializationError, Engine, FatalBackendError, Generator, InvalidCallback, Job, JobWrapper, Lifecycle, MigrationGenerator, Monitor, PerformableMailer, PerformableMethod, Plugin, Priority, Worker, WorkerTimeout

Class Method Summary collapse

Class Method Details

.lifecycleObject



50
51
52
53
# File 'lib/delayed.rb', line 50

def self.lifecycle
  setup_lifecycle unless @lifecycle
  @lifecycle
end

.loggerObject



60
61
62
# File 'lib/delayed.rb', line 60

def self.logger
  @logger ||= Rails.logger
end

.logger=(value) ⇒ Object



64
65
66
# File 'lib/delayed.rb', line 64

def self.logger=(value)
  @logger = value
end

.say(message, level = default_log_level) ⇒ Object



68
69
70
# File 'lib/delayed.rb', line 68

def self.say(message, level = default_log_level)
  logger&.send(level, message)
end

.setup_lifecycleObject



55
56
57
58
# File 'lib/delayed.rb', line 55

def self.setup_lifecycle
  @lifecycle = Delayed::Lifecycle.new
  plugins.each { |klass| klass.new }
end