Class: ActiveJob::ExecutionContext

Inherits:
ActiveSupport::CurrentAttributes
  • Object
show all
Defined in:
lib/active_job/execution_context.rb

Defined Under Namespace

Modules: Integration

Instance Method Summary collapse

Instance Method Details

#executing?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/active_job/execution_context.rb', line 18

def executing?
  job.present?
end

#in_job?(object) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/active_job/execution_context.rb', line 22

def in_job?(object)
  executing? && job.arguments.include?(object)
end