Class: AWS::Flow::WorkerOptions

Inherits:
Options
  • Object
show all
Defined in:
aws-flow-ruby/aws-flow/lib/aws/decider/options.rb

Overview

Options for activity and workflow workers.

Instance Attribute Summary (collapse)

Method Summary

Methods inherited from Options

#get_options, inherited, #initialize

Constructor Details

This class inherits a constructor from AWS::Flow::Options

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class AWS::Flow::Options

Instance Attribute Details

- (Object) execution_workers

The maximum number of execution workers that can be running at once. You can set this to zero or nil, in which case the default value of 20 will be used.



153
154
155
156
157
158
159
160
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 153

class WorkerOptions < Options
  property(:logger, [])
  # At current, we only support one poller per worker
  # property(:poller_workers, [lambda(&:to_i)])
  property(:execution_workers, [lambda(&:to_i)])
  property(:use_forking, [lambda {|x| x == true}] )
  default_classes << WorkerDefaults.new
end

- (Object) logger

The logger to use for the worker.



153
154
155
156
157
158
159
160
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 153

class WorkerOptions < Options
  property(:logger, [])
  # At current, we only support one poller per worker
  # property(:poller_workers, [lambda(&:to_i)])
  property(:execution_workers, [lambda(&:to_i)])
  property(:use_forking, [lambda {|x| x == true}] )
  default_classes << WorkerDefaults.new
end

- (Object) use_forking

Whether to use Ruby's fork for launching new workers. The default is true.

On Windows, use_forking should generally be set to false:

AWS::Flow::ActivityWorker.new(
    @domain.client, @domain, ACTIVITY_TASKLIST, klass) { { use_forking: false } }

For more information, see Important Notes in the AWS Flow Framework for Ruby Developer Guide.



153
154
155
156
157
158
159
160
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 153

class WorkerOptions < Options
  property(:logger, [])
  # At current, we only support one poller per worker
  # property(:poller_workers, [lambda(&:to_i)])
  property(:execution_workers, [lambda(&:to_i)])
  property(:use_forking, [lambda {|x| x == true}] )
  default_classes << WorkerDefaults.new
end