Class: ElasticBeans::Environment::Worker
- Inherits:
-
ElasticBeans::Environment
- Object
- ElasticBeans::Environment
- ElasticBeans::Environment::Worker
- 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
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
Attributes inherited from ElasticBeans::Environment
Instance Method Summary collapse
-
#initialize(name, queue: nil, **_) ⇒ Worker
constructor
A new instance of Worker.
-
#type ⇒ Object
Returns “worker”.
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
#queue ⇒ Object (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
#type ⇒ Object
Returns “worker”
21 22 23 |
# File 'lib/elastic_beans/environment/worker.rb', line 21 def type TYPE end |