Module: Cloudtasker

Defined in:
lib/cloudtasker.rb,
lib/cloudtasker/cli.rb,
lib/cloudtasker/config.rb,
lib/cloudtasker/engine.rb,
lib/cloudtasker/worker.rb,
lib/cloudtasker/testing.rb,
lib/cloudtasker/version.rb,
lib/cloudtasker/cron/job.rb,
lib/cloudtasker/batch/job.rb,
lib/cloudtasker/cloud_task.rb,
lib/cloudtasker/meta_store.rb,
lib/cloudtasker/unique_job.rb,
lib/cloudtasker/local_server.rb,
lib/cloudtasker/redis_client.rb,
lib/cloudtasker/authenticator.rb,
lib/cloudtasker/cron/schedule.rb,
lib/cloudtasker/worker_logger.rb,
lib/cloudtasker/unique_job/job.rb,
lib/cloudtasker/worker_handler.rb,
lib/cloudtasker/worker_wrapper.rb,
lib/cloudtasker/cron/middleware.rb,
lib/cloudtasker/batch/middleware.rb,
lib/cloudtasker/middleware/chain.rb,
lib/cloudtasker/dead_worker_error.rb,
lib/cloudtasker/backend/redis_task.rb,
lib/cloudtasker/backend/memory_task.rb,
lib/cloudtasker/authentication_error.rb,
lib/cloudtasker/batch/batch_progress.rb,
lib/cloudtasker/invalid_worker_error.rb,
lib/cloudtasker/unique_job/lock/no_op.rb,
lib/cloudtasker/unique_job/lock_error.rb,
lib/cloudtasker/unique_job/middleware.rb,
lib/cloudtasker/batch/extension/worker.rb,
lib/cloudtasker/cron/middleware/server.rb,
lib/cloudtasker/batch/middleware/server.rb,
lib/cloudtasker/unique_job/lock/base_lock.rb,
lib/cloudtasker/backend/google_cloud_task_v1.rb,
lib/cloudtasker/backend/google_cloud_task_v2.rb,
lib/cloudtasker/max_task_size_exceeded_error.rb,
lib/cloudtasker/unique_job/middleware/client.rb,
lib/cloudtasker/unique_job/middleware/server.rb,
app/controllers/cloudtasker/worker_controller.rb,
lib/cloudtasker/missing_worker_arguments_error.rb,
lib/cloudtasker/unique_job/lock/until_executed.rb,
lib/cloudtasker/unique_job/lock/until_executing.rb,
lib/cloudtasker/unique_job/lock/while_executing.rb,
lib/cloudtasker/unique_job/conflict_strategy/raise.rb,
lib/cloudtasker/unique_job/conflict_strategy/reject.rb,
lib/cloudtasker/unique_job/conflict_strategy/reschedule.rb,
lib/cloudtasker/unique_job/conflict_strategy/base_strategy.rb

Overview

Define and manage Cloud Task based workers

Defined Under Namespace

Modules: Authenticator, Backend, Batch, CLI, Cron, Middleware, Testing, UniqueJob, Worker Classes: AuthenticationError, CloudTask, Config, DeadWorkerError, Engine, InvalidWorkerError, LocalServer, MaxTaskSizeExceededError, MetaStore, MissingWorkerArgumentsError, RedisClient, WorkerController, WorkerHandler, WorkerLogger, WorkerWrapper

Constant Summary collapse

VERSION =
'0.13.2'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#config=(value) ⇒ Object (writeonly)

Sets the attribute config

Parameters:

  • value

    the value to set the attribute config to.



26
27
28
# File 'lib/cloudtasker.rb', line 26

def config=(value)
  @config = value
end

Class Method Details

.configCloudtasker::Config

Return the Cloudtasker configuration.

Returns:



40
41
42
# File 'lib/cloudtasker.rb', line 40

def self.config
  @config ||= Config.new
end

.configure {|config| ... } ⇒ Object

Cloudtasker configurator.

Yields:



31
32
33
# File 'lib/cloudtasker.rb', line 31

def self.configure
  yield(config)
end

.loggerLogger

Return the Cloudtasker logger.

Returns:

  • (Logger)

    The Cloudtasker logger.



49
50
51
# File 'lib/cloudtasker.rb', line 49

def self.logger
  config.logger
end