Class: ElasticBeans::Environment::Worker

Inherits:
ElasticBeans::Environment show all
Defined in:
lib/elastic_beans/environment/worker.rb

Overview

The worker environments for background job execution. This class is used to construct multiple worker environments, one per queue.

Constant Summary collapse

TYPE =

:category: Internal

"worker"
TIER_NAME =

:category: Internal

"Worker"
TIER_TYPE =

:category: Internal

"SQS/HTTP"

Constants inherited from ElasticBeans::Environment

DEGRADED_TIMEOUT, TEMPLATE_NAME, WAIT_TIMEOUT, WORKER_TEMPLATE_NAME_PATTERN

Instance Attribute Summary collapse

Attributes inherited from ElasticBeans::Environment

#name

Instance Method Summary collapse

Methods inherited from ElasticBeans::Environment

#cname, #create, #deploy_version, #instance_ids, new_by_type, new_from_existing, #restart, #scale, #status, #update_configuration

Constructor Details

#initialize(name, queue: nil, **_) ⇒ Worker

Returns a new instance of Worker.



15
16
17
18
# File 'lib/elastic_beans/environment/worker.rb', line 15

def initialize(name, queue: nil, **_)
  super
  @queue = queue || "default"
end

Instance Attribute Details

#queueObject (readonly)

Returns the value of attribute queue.



13
14
15
# File 'lib/elastic_beans/environment/worker.rb', line 13

def queue
  @queue
end

Instance Method Details

#typeObject

Returns “worker”



21
22
23
# File 'lib/elastic_beans/environment/worker.rb', line 21

def type
  TYPE
end