Class: ActiveJob::QueueAdapters::CloudtaskerAdapter
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::CloudtaskerAdapter
- Defined in:
- lib/active_job/queue_adapters/cloudtasker_adapter.rb
Overview
Cloudtasker adapter for Active Job
To use Cloudtasker set the queue_adapter config to :cloudtasker
.
Rails.application.config.active_job.queue_adapter = :cloudtasker
Defined Under Namespace
Classes: JobWrapper
Constant Summary collapse
- SERIALIZATION_FILTERED_KEYS =
[ 'executions', # Given by the worker at processing 'provider_job_id', # Also given by the worker at processing 'priority' # Not used ].freeze
Instance Method Summary collapse
-
#enqueue(job) ⇒ Cloudtasker::CloudTask
Enqueues the given ActiveJob instance for execution.
-
#enqueue_at(job, precise_timestamp) ⇒ Cloudtasker::CloudTask
Enqueues the given ActiveJob instance for execution at a given time.
Instance Method Details
#enqueue(job) ⇒ Cloudtasker::CloudTask
Enqueues the given ActiveJob instance for execution
26 27 28 |
# File 'lib/active_job/queue_adapters/cloudtasker_adapter.rb', line 26 def enqueue(job) build_worker(job).schedule end |
#enqueue_at(job, precise_timestamp) ⇒ Cloudtasker::CloudTask
Enqueues the given ActiveJob instance for execution at a given time
37 38 39 |
# File 'lib/active_job/queue_adapters/cloudtasker_adapter.rb', line 37 def enqueue_at(job, ) build_worker(job).schedule(time_at: Time.at()) end |