aws-flow 2.2.2 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDI2ZDNmZmEwMDNiODkwZWY0ODBkZDI0ZDM1OTFjZjBjZGU4YzJjZg==
4
+ ODBlYWU5MDRjNmJhYzIyYTI4YmNmZTZmNjA1OGRmZGJmMjA3MTEwYw==
5
5
  data.tar.gz: !binary |-
6
- MzExMWQ1YjhkZjZmZWVlMTQ4MDU4NTFmNjkxYjUwNTVjMTU5YTIxMA==
6
+ OTc3ZTNiNTEyYTlmY2E5NmVkNzZmNTIyZjAyZjllZDE2NDRhZmVkNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWRkNTIyNjk3ZmNkM2E4NWNjYTU3NTIyNTE0NjhjOGEzZjY5YjAwMDcwMTRj
10
- YWNhOTNlM2E3M2E4ZDdhNGYzNGY4OTU4MjljMjBhOTIwMjIwNGNlYWVkM2Y0
11
- MzVjODgyYjcyYjQ3NWU3NTJhNzM1M2RkNDNmNDI0MTJkMzUzNDQ=
9
+ YmUzNDVmMjc4NzNlYjcyN2NlODEzZDQ1NWQ4ZDRiNjZlMzIyMzQzYzlhYTli
10
+ YmYwNWM1M2U3OTJkMmQwZTc3ZWFmNWI2NTIxMDQ0ZDQ4MDE0NmMzOTI2MDVi
11
+ YzJjYTYwMTE2NzFkMTJkNGNkNDZhZGM3MTdiMWE1YmMyNWEzZmY=
12
12
  data.tar.gz: !binary |-
13
- MjA3NDUyYWVmOTJiMzUwODMwZTVjOGY3ODhlYWY1YzBmYTM4NzdjOWUyYjZh
14
- ZGU2YjMxNTBjYTgyMGYzY2RiNTEyMWM1NzZiOGNhZTI1MDc5ZjI1NjhiY2Yy
15
- ZWI4ZTU5NWMzZTI1NTZkYzNiNjA4YTA5NTdjNTI1YzMyYmYxMmU=
13
+ MGE1OWYwZGJjYjEyNTljN2E4ZjFlMTFhZWI5YmU5NzJlOWRjOGViYTVmZjIy
14
+ OTMzNmY3YzIwNmE2YzZhZjBkNDZjNDgyMjcyZTBmOGUyOTM2MmFiYzc3YmNi
15
+ M2E5MDQ5MDI4Mjc1NWFlMTFjNzNjMDk4ZjkxNDc0YmVmMTg5ZjA=
@@ -13,5 +13,5 @@ Gem::Specification.new do |s|
13
13
  s.files = `git ls-files`.split("\n").reject {|file| file =~ /aws-flow-core/}
14
14
  s.require_paths << "lib/aws/"
15
15
  s.required_ruby_version = ">= 1.9.1"
16
- s.add_dependency "aws-sdk-v1", "~> 1", ">= 1.39.0"
16
+ s.add_dependency "aws-sdk-v1", "~> 1", ">= 1.60.1"
17
17
  end
@@ -433,6 +433,7 @@ module AWS
433
433
  # :default_task_schedule_to_close_timeout => "20",
434
434
  # :default_task_schedule_to_start_timeout => "20",
435
435
  # :default_task_start_to_close_timeout => "20",
436
+ # :default_task_priority => "0",
436
437
  # :version => "1",
437
438
  # :prefix_name => "ExampleActivity"
438
439
  # }
@@ -313,7 +313,7 @@ module AWS
313
313
  }
314
314
 
315
315
  task_list = continue_as_new_options.task_list ? {:task_list => {:name => continue_as_new_options.task_list}} : {}
316
- to_add = continue_as_new_options.get_options([:execution_start_to_close_timeout, :task_start_to_close_timeout, :child_policy, :tag_list, :workflow_type_version, :input], task_list)
316
+ to_add = continue_as_new_options.get_options([:execution_start_to_close_timeout, :task_start_to_close_timeout, :task_priority, :child_policy, :tag_list, :workflow_type_version, :input], task_list)
317
317
  result[:continue_as_new_workflow_execution_decision_attributes] = to_add
318
318
  CompleteWorkflowStateMachine.new(decision_id, result)
319
319
  end
@@ -357,6 +357,9 @@ module AWS
357
357
  # array (no tags).
358
358
  def tag_list; []; end
359
359
 
360
+ # The default task priority.The default value is '0'
361
+ def default_task_priority; 0; end
362
+
360
363
  def default_task_list; FlowConstants.use_worker_task_list; end
361
364
  end
362
365
 
@@ -439,6 +442,20 @@ module AWS
439
442
  # value can be used to specify the duration in seconds while `NONE` can be
440
443
  # used to specify unlimited duration. The default is `30`.
441
444
  #
445
+ # @!attribute task_priority
446
+ # The optional task priority if set, specifies the priority for the
447
+ # decision tasks for a workflow execution. This overrides the
448
+ # defaultTaskPriority specified when registering the WorkflowType. The
449
+ # valid values are Integers between Integer.MAX_VALUE to
450
+ # Integer.MIN_VALUE, i.e. between 2147483647 and -2147483648 for 32-bit
451
+ # integer. An integer value can be used to specify the priority with
452
+ # which a workflow must be started.
453
+ #
454
+ # Note: task_priority for a workflow must be specified either as a
455
+ # default for the WorkflowType or through this field. If neither this
456
+ # field is set nor a default_task_priority is specified at registration
457
+ # time then it will be assumed nil.
458
+ #
442
459
  # @!attribute version
443
460
  # A string that represents the version of the workflow. This can be any
444
461
  # alphanumeric string. If you update any of the other options, you must
@@ -461,6 +478,7 @@ module AWS
461
478
  :workflow_id,
462
479
  :execution_start_to_close_timeout,
463
480
  :task_start_to_close_timeout,
481
+ :task_priority,
464
482
  :task_list,
465
483
  :execution_method
466
484
  )
@@ -490,6 +508,7 @@ module AWS
490
508
  :default_task_start_to_close_timeout,
491
509
  :default_execution_start_to_close_timeout,
492
510
  :default_task_list,
511
+ :default_task_priority,
493
512
  :default_child_policy
494
513
  ]
495
514
  end
@@ -499,7 +518,8 @@ module AWS
499
518
  properties(
500
519
  :default_task_start_to_close_timeout,
501
520
  :default_execution_start_to_close_timeout,
502
- :default_task_list
521
+ :default_task_list,
522
+ :default_task_priority
503
523
  )
504
524
 
505
525
  property(:default_child_policy, [lambda(&:to_s), lambda(&:upcase)])
@@ -582,6 +602,17 @@ module AWS
582
602
  # `FlowConstants.use_worker_task_list` will be used, which causes the
583
603
  # activities to use the task list specified for the activity worker.
584
604
  def default_task_list; FlowConstants.use_worker_task_list; end
605
+
606
+ # The optional default task priority, specified when registering the activity type,
607
+ # for tasks of this activity type. This default can be overridden when scheduling
608
+ # a task through - the ScheduleActivityTask Decision.
609
+ # The valid values are Integer number(Integer.MAX_VALUE to Integer.MIN_VALUE),
610
+ # (2147483647 to -2147483648) for 32-bit integer.
611
+ # An integer value can be used to specify the priority with which an activity must
612
+ # be executed.
613
+ def default_task_priority; 0; end
614
+
615
+ def default_task_list; FlowConstants.use_worker_task_list; end
585
616
  end
586
617
 
587
618
  # Options to use on an activity or decider. The following options are
@@ -612,6 +643,13 @@ module AWS
612
643
  # decision. You can override this default when scheduling a task through
613
644
  # the `ScheduleActivityTask` decision.
614
645
  #
646
+ # @!attribute default_task_priority
647
+ # The optional default task priority specified for this activity type at
648
+ # registration. This default task priority is used if a task priority is not
649
+ # provided when a task is scheduled through the `ScheduleActivityTask`
650
+ # decision. You can override this default when scheduling a task through
651
+ # the `ScheduleActivityTask` decision.
652
+ #
615
653
  # @!attribute default_task_schedule_to_close_timeout
616
654
  # The optional default maximum duration, specified when registering the
617
655
  # activity type, for tasks of this activity type. You can override this
@@ -642,6 +680,7 @@ module AWS
642
680
  :schedule_to_close_timeout,
643
681
  :schedule_to_start_timeout,
644
682
  :start_to_close_timeout,
683
+ :task_priority,
645
684
  :version,
646
685
  :input
647
686
  )
@@ -714,6 +753,12 @@ module AWS
714
753
  # provided when a task is scheduled through the ScheduleActivityTask
715
754
  # decision.
716
755
  #
756
+ # @option default_options [Array] :task_priority
757
+ # The optional default task priority specified for this activity type at
758
+ # registration. This default task priority is used if a task priority is not
759
+ # provided when a task is scheduled through the ScheduleActivityTask
760
+ # decision.
761
+ #
717
762
  # You can override this default when scheduling a task through the
718
763
  # `ScheduleActivityTask` decision.
719
764
  #
@@ -772,7 +817,8 @@ module AWS
772
817
  :default_task_schedule_to_close_timeout,
773
818
  :default_task_schedule_to_start_timeout,
774
819
  :default_task_start_to_close_timeout,
775
- :default_task_list
820
+ :default_task_list,
821
+ :default_task_priority
776
822
  ]
777
823
  end
778
824
  end
@@ -784,6 +830,7 @@ module AWS
784
830
  :default_task_schedule_to_close_timeout,
785
831
  :default_task_schedule_to_start_timeout,
786
832
  :default_task_start_to_close_timeout,
833
+ :default_task_priority
787
834
  )
788
835
 
789
836
  default_classes << ActivityRegistrationDefaults.new
@@ -195,7 +195,7 @@ module AWS
195
195
  }
196
196
  }
197
197
  task_list = options.task_list ? {:task_list => {:name => options.task_list}} : {}
198
- to_add = options.get_options([:heartbeat_timeout, :schedule_to_close_timeout, :schedule_to_start_timeout, :start_to_close_timeout, :input], task_list)
198
+ to_add = options.get_options([:heartbeat_timeout, :schedule_to_close_timeout, :task_priority, :schedule_to_start_timeout, :start_to_close_timeout, :input], task_list)
199
199
  result[attribute_type].merge!(to_add)
200
200
  result
201
201
  end
@@ -336,7 +336,7 @@ module AWS
336
336
  }
337
337
  result[:start_child_workflow_execution_decision_attributes].delete(:task_list) if options.task_list.nil?
338
338
  #TODO Figure out what control is
339
- to_add = options.get_options([:execution_start_to_close_timeout, :task_start_to_close_timeout, :child_policy, :tag_list, :input])
339
+ to_add = options.get_options([:execution_start_to_close_timeout, :task_start_to_close_timeout, :task_priority, :child_policy, :tag_list, :input])
340
340
  result[attribute_name].merge!(to_add)
341
341
  result
342
342
  end
@@ -16,7 +16,7 @@
16
16
  module AWS
17
17
  module Flow
18
18
  def self.version
19
- "2.2.2"
19
+ "2.3.0"
20
20
  end
21
21
  end
22
22
  end
@@ -166,7 +166,8 @@ module AWS
166
166
  [
167
167
  :default_task_start_to_close_timeout,
168
168
  :default_execution_start_to_close_timeout,
169
- :default_child_policy
169
+ :default_child_policy,
170
+ :default_task_priority
170
171
  ], {
171
172
  :domain => @domain.name,
172
173
  :name => workflow_type.name,
@@ -200,7 +200,7 @@ describe Activities do
200
200
  }
201
201
  }
202
202
  }
203
- end
203
+ end
204
204
  def run_activity1
205
205
  "My name is Ozymandias - 1"
206
206
  end
@@ -1343,7 +1343,7 @@ describe "RubyFlowDecider" do
1343
1343
 
1344
1344
  workflow_execution = parent_client.start_execution
1345
1345
  wait_for_execution(workflow_execution)
1346
-
1346
+
1347
1347
  events = workflow_execution.events.map(&:event_type)
1348
1348
  workflow_execution.events.to_a.last.attributes.result.should_not =~ /secret_access_key/
1349
1349
  events.should include("ChildWorkflowExecutionStarted", "ChildWorkflowExecutionCompleted", "WorkflowExecutionCompleted")
@@ -0,0 +1,210 @@
1
+ require_relative 'setup'
2
+
3
+ describe "task_priority" do
4
+
5
+ before(:all) do
6
+ @swf, @domain = setup_swf
7
+ end
8
+
9
+ context "activities and workflows" do
10
+
11
+ before(:all) do
12
+
13
+ class ActivityForTaskPriority
14
+ extend AWS::Flow::Activities
15
+ activity :run_1 do
16
+ {
17
+ version: "1.0",
18
+ default_task_priority: 20
19
+ }
20
+ end
21
+ activity :run_2 do
22
+ {
23
+ version: "1.0"
24
+ }
25
+ end
26
+ def run_1; end
27
+ end
28
+
29
+ class WorkflowForTaskPriority
30
+ extend AWS::Flow::Workflows
31
+ workflow :start do
32
+ {
33
+ version: "1.0",
34
+ default_execution_start_to_close_timeout: 300,
35
+ default_task_priority: "10",
36
+ }
37
+ end
38
+ activity_client(:activity) { { :from_class => "ActivityForTaskPriority"} }
39
+ def start
40
+ activity.run_1
41
+ activity.run_2
42
+ end
43
+ end
44
+
45
+ end
46
+
47
+ it "ensures that default_task_priority values are assigned when workflow is started and when activity is scheduled" do
48
+ task_list = "activity_task_list1"
49
+
50
+ worker = WorkflowWorker.new(@domain.client, @domain, task_list, WorkflowForTaskPriority)
51
+ activity_worker = ActivityWorker.new(@domain.client, @domain, task_list, ActivityForTaskPriority)
52
+ worker.register
53
+ activity_worker.register
54
+
55
+ client = AWS::Flow::workflow_client(@domain.client, @domain) { {from_class: "WorkflowForTaskPriority"} }
56
+ execution = client.start_execution
57
+
58
+ worker.run_once
59
+ activity_worker.run_once
60
+ worker.run_once
61
+ activity_worker.run_once
62
+ worker.run_once
63
+ wait_for_execution(execution)
64
+
65
+ event = execution.events.select { |x| x.event_type =~ /ActivityTaskScheduled/ }
66
+ event.first.attributes[:task_priority].should == "20"
67
+ event.last.attributes[:task_priority].should == "0"
68
+ events = execution.events.select { |x| x.event_type =~ /DecisionTaskScheduled/ }
69
+ events.first.attributes[:taskPriority].should == "10"
70
+ end
71
+
72
+ it "ensures that overriden values of task priority are assigned when workflow is started and when activity is scheduled" do
73
+ task_list = "activity_task_list1"
74
+ class WorkflowForTaskPriority
75
+ def start
76
+ activity.run_1 { { task_priority: "200" } }
77
+ end
78
+ end
79
+ worker = WorkflowWorker.new(@domain.client, @domain, task_list, WorkflowForTaskPriority)
80
+ activity_worker = ActivityWorker.new(@domain.client, @domain, task_list, ActivityForTaskPriority)
81
+ worker.register
82
+ activity_worker.register
83
+
84
+ client = AWS::Flow::workflow_client(@domain.client, @domain) { {from_class: "WorkflowForTaskPriority"} }
85
+ execution = client.start_execution { { task_priority: "100" } }
86
+
87
+ worker.run_once
88
+ activity_worker.run_once
89
+ worker.run_once
90
+
91
+ wait_for_execution(execution)
92
+
93
+ event = execution.events.select { |x| x.event_type =~ /ActivityTaskScheduled/ }
94
+ event.first.attributes[:task_priority].should == "200"
95
+ events = execution.events.select { |x| x.event_type =~ /DecisionTaskScheduled/ }
96
+ events.first.attributes[:taskPriority].should == "100"
97
+ end
98
+
99
+ end
100
+
101
+ context "continue_as_new" do
102
+ before (:all) do
103
+ class ContinueAsNewPriorityWorkflow
104
+ extend AWS::Flow::Workflows
105
+ workflow :entry_point do
106
+ {
107
+ version: "1.0",
108
+ default_task_priority: 50,
109
+ default_execution_start_to_close_timeout: 60
110
+ }
111
+ end
112
+ def entry_point
113
+ continue_as_new
114
+ end
115
+ end
116
+
117
+ end
118
+
119
+ it "makes sure that continue_as_new takes parent's task priority" do
120
+ worker = AWS::Flow::WorkflowWorker.new(@domain.client, @domain, "continue_as_new", ContinueAsNewPriorityWorkflow)
121
+ worker.register
122
+ client = AWS::Flow::workflow_client(@domain.client, @domain) { { from_class: "ContinueAsNewPriorityWorkflow" } }
123
+
124
+ execution = client.entry_point { { task_list: "continue_as_new" } }
125
+ worker.run_once
126
+ sleep 1
127
+ wait_for_execution(execution)
128
+ execution.events.map(&:event_type).last.should == "WorkflowExecutionContinuedAsNew"
129
+ execution.status.should == :continued_as_new
130
+ events = execution.events.select { |x| x.event_type == "WorkflowExecutionContinuedAsNew" }
131
+ events.first.attributes.task_priority.should == "50"
132
+ end
133
+
134
+
135
+ it "makes sure continue_as_new overrides parent's task priority" do
136
+ class ContinueAsNewPriorityWorkflow
137
+ def entry_point
138
+ continue_as_new { { task_priority: 100 } }
139
+ end
140
+ end
141
+
142
+ worker = AWS::Flow::WorkflowWorker.new(@domain.client, @domain, "continue_as_new_1", ContinueAsNewPriorityWorkflow)
143
+ worker.register
144
+ client = AWS::Flow::workflow_client(@domain.client, @domain) { { from_class: "ContinueAsNewPriorityWorkflow" } }
145
+
146
+ execution = client.entry_point { { task_list: "continue_as_new_1" } }
147
+ worker.run_once
148
+ sleep 1
149
+ wait_for_execution(execution)
150
+ execution.events.map(&:event_type).last.should == "WorkflowExecutionContinuedAsNew"
151
+ execution.status.should == :continued_as_new
152
+ events = execution.events.select { |x| x.event_type == "WorkflowExecutionContinuedAsNew" }
153
+ events.first.attributes.task_priority.should == "100"
154
+ end
155
+ end
156
+
157
+ context "child_workflows" do
158
+
159
+ it "test whether task priority is overridden for child workflow" do
160
+ class ChildWorkflowsTestChildWorkflow
161
+ extend AWS::Flow::Workflows
162
+ workflow :child do
163
+ {
164
+ version: "1.0",
165
+ default_task_priority: 100,
166
+ default_execution_start_to_close_timeout: 600,
167
+ default_task_start_to_close_timeout:10,
168
+ }
169
+ end
170
+ def child; sleep 1; end
171
+ end
172
+
173
+ class ChildWorkflowsTestParentWorkflow
174
+ extend AWS::Flow::Workflows
175
+ workflow :parent do
176
+ {
177
+ version: "1.0",
178
+ default_execution_start_to_close_timeout: 600,
179
+ default_task_list: "test"
180
+ }
181
+ end
182
+ def parent
183
+ domain = get_test_domain
184
+ client = AWS::Flow::workflow_client(domain.client, domain) { { from_class: "ChildWorkflowsTestChildWorkflow", task_list: "test2" } }
185
+ client.send_async(:start_execution)
186
+ client.send_async(:start_execution)
187
+ end
188
+ end
189
+
190
+ parent_client = AWS::Flow::workflow_client(@domain.client, @domain) { { from_class: "ChildWorkflowsTestParentWorkflow" } }
191
+ @child_worker = WorkflowWorker.new(@domain.client, @domain, "test2", ChildWorkflowsTestChildWorkflow)
192
+ @parent_worker = WorkflowWorker.new(@domain.client, @domain, "test", ChildWorkflowsTestParentWorkflow)
193
+
194
+ @forking_executor = ForkingExecutor.new(:max_workers => 3)
195
+ @forking_executor.execute { @parent_worker.start }
196
+ @forking_executor.execute { @child_worker.start }
197
+ @forking_executor.execute { @child_worker.start }
198
+ sleep 2
199
+
200
+ workflow_execution = parent_client.start_execution
201
+ wait_for_execution(workflow_execution)
202
+
203
+ events = workflow_execution.events.map(&:event_type)
204
+ events.should include("ChildWorkflowExecutionStarted", "ChildWorkflowExecutionCompleted", "WorkflowExecutionCompleted")
205
+ @forking_executor.shutdown 0
206
+ end
207
+
208
+ end
209
+
210
+ end
@@ -10,6 +10,7 @@ describe AWS::Flow::ActivityRegistrationOptions do
10
10
  default_task_schedule_to_close_timeout: "NONE",
11
11
  default_task_schedule_to_start_timeout: "NONE",
12
12
  default_task_start_to_close_timeout: "NONE",
13
+ default_task_priority: "0",
13
14
  default_task_list: "USE_WORKER_TASK_LIST"
14
15
  }
15
16
  end
@@ -20,6 +21,7 @@ describe AWS::Flow::ActivityRegistrationOptions do
20
21
  default_task_schedule_to_close_timeout: 50,
21
22
  default_task_start_to_close_timeout: 30,
22
23
  default_task_heartbeat_timeout: 5,
24
+ default_task_priority: 100,
23
25
  default_task_list: "test_tasklist",
24
26
  })
25
27
  options.get_registration_options.should == {
@@ -27,6 +29,7 @@ describe AWS::Flow::ActivityRegistrationOptions do
27
29
  default_task_schedule_to_close_timeout: "50",
28
30
  default_task_schedule_to_start_timeout: "20",
29
31
  default_task_start_to_close_timeout: "30",
32
+ default_task_priority: "100",
30
33
  default_task_list: "test_tasklist"
31
34
  }
32
35
  end
@@ -42,6 +45,7 @@ describe AWS::Flow::ActivityRegistrationOptions do
42
45
  default_task_schedule_to_close_timeout: "NONE",
43
46
  default_task_schedule_to_start_timeout: "NONE",
44
47
  default_task_start_to_close_timeout: "NONE",
48
+ default_task_priority: "0",
45
49
  default_task_list: "USE_WORKER_TASK_LIST",
46
50
  data_converter: FlowConstants.default_data_converter
47
51
  }
@@ -60,6 +64,7 @@ describe AWS::Flow::ActivityRegistrationOptions do
60
64
  task_list: "test_tasklist",
61
65
  version: "1.0",
62
66
  prefix_name: "FooActivity",
67
+ task_priority: 100,
63
68
  manual_completion: true,
64
69
  heartbeat_timeout: 10
65
70
  })
@@ -71,6 +76,8 @@ describe AWS::Flow::ActivityRegistrationOptions do
71
76
  default_task_start_to_close_timeout: "30",
72
77
  default_task_list: "USE_WORKER_TASK_LIST",
73
78
  task_list: "test_tasklist",
79
+ default_task_priority: "0",
80
+ task_priority: "100",
74
81
  version: "1.0",
75
82
  prefix_name: "FooActivity",
76
83
  manual_completion: true,
@@ -97,6 +104,7 @@ describe AWS::Flow::WorkflowRegistrationOptions do
97
104
  options.get_registration_options.should == {
98
105
  default_task_start_to_close_timeout: "30",
99
106
  default_child_policy: "TERMINATE",
107
+ default_task_priority: "0",
100
108
  default_task_list: "USE_WORKER_TASK_LIST"
101
109
  }
102
110
  end
@@ -106,12 +114,14 @@ describe AWS::Flow::WorkflowRegistrationOptions do
106
114
  default_task_schedule_to_close_timeout: 30,
107
115
  default_execution_start_to_close_timeout: 600,
108
116
  default_child_policy: "ABANDON",
117
+ default_task_priority: "100",
109
118
  default_task_list: "task_list"
110
119
  })
111
120
  options.get_registration_options.should == {
112
121
  default_task_start_to_close_timeout: "30",
113
122
  default_execution_start_to_close_timeout: "600",
114
123
  default_child_policy: "ABANDON",
124
+ default_task_priority: "100",
115
125
  default_task_list: "task_list"
116
126
  }
117
127
  end
@@ -127,6 +137,7 @@ describe AWS::Flow::WorkflowRegistrationOptions do
127
137
  default_task_start_to_close_timeout: "30",
128
138
  default_child_policy: "TERMINATE",
129
139
  default_task_list: "USE_WORKER_TASK_LIST",
140
+ default_task_priority: "0",
130
141
  tag_list: [],
131
142
  data_converter: FlowConstants.default_data_converter
132
143
  }
@@ -153,6 +164,7 @@ describe AWS::Flow::WorkflowRegistrationOptions do
153
164
  default_child_policy: "TERMINATE",
154
165
  default_task_list: "USE_WORKER_TASK_LIST",
155
166
  task_list: "test_tasklist",
167
+ default_task_priority: "0",
156
168
  version: "1.0",
157
169
  prefix_name: "FooActivity",
158
170
  data_converter: FlowConstants.default_data_converter,
@@ -189,6 +201,7 @@ describe AWS::Flow::ActivityOptions do
189
201
  task_list: "test_tasklist",
190
202
  version: "1.0",
191
203
  prefix_name: "FooActivity",
204
+ task_priority: 100,
192
205
  manual_completion: true,
193
206
  heartbeat_timeout: 10
194
207
  })
@@ -198,6 +211,7 @@ describe AWS::Flow::ActivityOptions do
198
211
  version: "1.0",
199
212
  prefix_name: "FooActivity",
200
213
  manual_completion: true,
214
+ task_priority: "100",
201
215
  heartbeat_timeout: "10",
202
216
  data_converter: FlowConstants.default_data_converter,
203
217
  }
@@ -263,6 +277,7 @@ describe AWS::Flow::WorkflowRegistrationDefaults do
263
277
  defaults.default_child_policy.should == "TERMINATE"
264
278
  defaults.tag_list.should == []
265
279
  defaults.default_task_list.should == AWS::Flow::FlowConstants.use_worker_task_list
280
+ defaults.default_task_priority == "0"
266
281
  end
267
282
 
268
283
  end
@@ -280,6 +295,7 @@ describe AWS::Flow::ActivityRegistrationDefaults do
280
295
  defaults.default_task_schedule_to_close_timeout.should == Float::INFINITY
281
296
  defaults.default_task_start_to_close_timeout.should == Float::INFINITY
282
297
  defaults.default_task_heartbeat_timeout.should == Float::INFINITY
298
+ defaults.default_task_priority == "0"
283
299
  defaults.default_task_list.should == AWS::Flow::FlowConstants.use_worker_task_list
284
300
  end
285
301
 
@@ -81,6 +81,7 @@ describe WorkflowWorker do
81
81
  workflow_options = {
82
82
  default_task_start_to_close_timeout: "30",
83
83
  default_child_policy: "TERMINATE",
84
+ default_task_priority: "0",
84
85
  domain: "UnitTestDomain",
85
86
  name: "DefaultTasklistTestWorkflow.workflow",
86
87
  version: "1.0",
@@ -91,6 +92,7 @@ describe WorkflowWorker do
91
92
  workflow2_options = {
92
93
  default_task_start_to_close_timeout: "30",
93
94
  default_child_policy: "TERMINATE",
95
+ default_task_priority: "0",
94
96
  domain: "UnitTestDomain",
95
97
  name: "DefaultTasklistTestWorkflow.workflow2",
96
98
  version: "1.0",
@@ -100,6 +102,7 @@ describe WorkflowWorker do
100
102
  }
101
103
  workflow3_options = {
102
104
  default_task_start_to_close_timeout: "30",
105
+ default_task_priority: "0",
103
106
  default_child_policy: "TERMINATE",
104
107
  domain: "UnitTestDomain",
105
108
  name: "DefaultTasklistTestWorkflow.workflow3",
@@ -207,6 +210,7 @@ describe ActivityWorker do
207
210
  default_task_schedule_to_close_timeout: "NONE",
208
211
  default_task_schedule_to_start_timeout: "NONE",
209
212
  default_task_start_to_close_timeout: "NONE",
213
+ default_task_priority: "0",
210
214
  default_task_list: {
211
215
  name: "task_list"
212
216
  }
@@ -220,6 +224,7 @@ describe ActivityWorker do
220
224
  default_task_schedule_to_close_timeout: "NONE",
221
225
  default_task_schedule_to_start_timeout: "NONE",
222
226
  default_task_start_to_close_timeout: "NONE",
227
+ default_task_priority: "0",
223
228
  default_task_list: {
224
229
  name: "my_own_task_list"
225
230
  }
@@ -233,6 +238,7 @@ describe ActivityWorker do
233
238
  default_task_schedule_to_close_timeout: "NONE",
234
239
  default_task_schedule_to_start_timeout: "NONE",
235
240
  default_task_start_to_close_timeout: "NONE",
241
+ default_task_priority: "0",
236
242
  default_task_list: {
237
243
  name: "task_list"
238
244
  }
@@ -4,7 +4,7 @@ include Test::Integ
4
4
  describe Replayer do
5
5
  before(:all) do
6
6
 
7
- @swf, @domain = setup_swf("ReplayerTest")
7
+ @swf, @domain = setup_swf
8
8
 
9
9
  class ReplayerTestActivity
10
10
  extend Activities
@@ -106,7 +106,8 @@ module Test
106
106
  sleep sleep_time until [
107
107
  "WorkflowExecutionCompleted",
108
108
  "WorkflowExecutionTimedOut",
109
- "WorkflowExecutionFailed"
109
+ "WorkflowExecutionFailed",
110
+ "WorkflowExecutionContinuedAsNew"
110
111
  ].include? execution.events.to_a.last.event_type
111
112
  end
112
113
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Steger, Paritosh Mohan, Jacques Thomas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-14 00:00:00.000000000 Z
11
+ date: 2014-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '1'
20
20
  - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
- version: 1.39.0
22
+ version: 1.60.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '1'
30
30
  - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
- version: 1.39.0
32
+ version: 1.60.1
33
33
  description: Library to provide the AWS Flow Framework for Ruby
34
34
  email: ''
35
35
  executables:
@@ -83,6 +83,7 @@ files:
83
83
  - lib/aws/runner.rb
84
84
  - spec/aws/decider/integration/activity_spec.rb
85
85
  - spec/aws/decider/integration/integration_spec.rb
86
+ - spec/aws/decider/integration/options_spec.rb
86
87
  - spec/aws/decider/integration/setup.rb
87
88
  - spec/aws/decider/unit/activity_spec.rb
88
89
  - spec/aws/decider/unit/async_retrying_executor_spec.rb