Class: Temporal::ExecutionOptions
- Inherits:
-
Object
- Object
- Temporal::ExecutionOptions
- Defined in:
- lib/temporal/execution_options.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#retry_policy ⇒ Object
readonly
Returns the value of attribute retry_policy.
-
#task_queue ⇒ Object
readonly
Returns the value of attribute task_queue.
-
#timeouts ⇒ Object
readonly
Returns the value of attribute timeouts.
Instance Method Summary collapse
-
#initialize(object, options = {}) ⇒ ExecutionOptions
constructor
A new instance of ExecutionOptions.
- #task_list ⇒ Object
Constructor Details
#initialize(object, options = {}) ⇒ ExecutionOptions
Returns a new instance of ExecutionOptions.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/temporal/execution_options.rb', line 7 def initialize(object, = {}) @name = [:name] || object.to_s @namespace = [:namespace] @task_queue = [:task_queue] || [:task_list] @retry_policy = [:retry_policy] @timeouts = [:timeouts] || {} @headers = [:headers] || {} if has_executable_concern?(object) @namespace ||= object.namespace @task_queue ||= object.task_queue @retry_policy ||= object.retry_policy @timeouts = object.timeouts.merge(@timeouts) if object.timeouts @headers = object.headers.merge(@headers) if object.headers end @namespace ||= Temporal.configuration.namespace @task_queue ||= Temporal.configuration.task_queue @timeouts = Temporal.configuration.timeouts.merge(@timeouts) @headers = Temporal.configuration.headers.merge(@headers) freeze end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/temporal/execution_options.rb', line 5 def headers @headers end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/temporal/execution_options.rb', line 5 def name @name end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
5 6 7 |
# File 'lib/temporal/execution_options.rb', line 5 def namespace @namespace end |
#retry_policy ⇒ Object (readonly)
Returns the value of attribute retry_policy.
5 6 7 |
# File 'lib/temporal/execution_options.rb', line 5 def retry_policy @retry_policy end |
#task_queue ⇒ Object (readonly)
Returns the value of attribute task_queue.
5 6 7 |
# File 'lib/temporal/execution_options.rb', line 5 def task_queue @task_queue end |
#timeouts ⇒ Object (readonly)
Returns the value of attribute timeouts.
5 6 7 |
# File 'lib/temporal/execution_options.rb', line 5 def timeouts @timeouts end |
Instance Method Details
#task_list ⇒ Object
31 32 33 |
# File 'lib/temporal/execution_options.rb', line 31 def task_list @task_queue end |