Class: AsyncCache::Workers::ActiveJobWorker

Inherits:
ActiveJob::Base
  • Object
show all
Includes:
Base
Defined in:
lib/async_cache/workers/active_job.rb

Class Method Summary collapse

Methods included from Base

#perform

Class Method Details

.enqueue_async_job(key:, version:, expires_in:, block:, arguments:) ⇒ Object



14
15
16
# File 'lib/async_cache/workers/active_job.rb', line 14

def self.enqueue_async_job(key:, version:, expires_in:, block:, arguments:)
  self.perform_later key, version, expires_in, arguments, block
end

.has_workers?Boolean

Returns:

  • (Boolean)


8
9
10
11
12
# File 'lib/async_cache/workers/active_job.rb', line 8

def self.has_workers?
  # ActiveJob doesn't provide a way to see if worker processes are
  # running so we just assume that they are
  true
end