glider 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/examples/Gemfile +1 -1
- data/examples/Gemfile.lock +2 -2
- data/examples/activity.rb +0 -1
- data/examples/workflow.rb +2 -0
- data/glider.gemspec +2 -2
- data/lib/glider/activities.rb +8 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 942daad303f059b635baba885e7cfc1a4f143403
|
4
|
+
data.tar.gz: 2f80d4b0769547407f87ed909951074760dc0e5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 079fbb53981ab9a4cf19eb990e16bf577dda9920440958832ba4e99e44bccf834fe8aa6c1b0512072cbbc057aa935d678679299d7d081510a941a813b09d3bae
|
7
|
+
data.tar.gz: b73d5c0a1e4aa84555760be15bb4ebae20b097042e87b656a421cadb7934e3f63878dd526d3ef1a6c7f85caebbf00ddf245bf9dd3469c6da413860db1c22ba64
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/examples/Gemfile
CHANGED
data/examples/Gemfile.lock
CHANGED
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
uuidtools (~> 2.1)
|
15
15
|
coderay (1.1.0)
|
16
16
|
colorize (0.6.0)
|
17
|
-
glider (0.1.
|
17
|
+
glider (0.1.6)
|
18
18
|
activesupport (>= 4.0.0)
|
19
19
|
aws-sdk
|
20
20
|
json
|
@@ -40,5 +40,5 @@ PLATFORMS
|
|
40
40
|
DEPENDENCIES
|
41
41
|
aws-sdk
|
42
42
|
colorize
|
43
|
-
glider (= 0.1.
|
43
|
+
glider (= 0.1.6)
|
44
44
|
pry
|
data/examples/activity.rb
CHANGED
data/examples/workflow.rb
CHANGED
@@ -13,6 +13,8 @@ class MySWF < Glider::Component
|
|
13
13
|
task.schedule_activity_task activity(:hello_world, 1.5), input: data.to_json
|
14
14
|
when :test_signal
|
15
15
|
# do what?
|
16
|
+
when :hello_world_activity_failed
|
17
|
+
$logger.error "EXPECTED ERROR!"
|
16
18
|
when :hello_world_activity_completed
|
17
19
|
task.complete_workflow_execution result: data
|
18
20
|
end
|
data/glider.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glider 0.1.
|
5
|
+
# stub: glider 0.1.6 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glider"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.6"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["David Pelaez"]
|
data/lib/glider/activities.rb
CHANGED
@@ -59,8 +59,14 @@ module Glider
|
|
59
59
|
workflow_id = activity_task.workflow_execution.workflow_id
|
60
60
|
Glider.logger.info "Executing activity=#{activity_type.name} workflow_id=#{workflow_id}"
|
61
61
|
target_instance = self.new activity_task
|
62
|
-
|
63
|
-
|
62
|
+
input = process_input(activity_task.input)
|
63
|
+
activity_result = target_instance.send activity_type.name, input
|
64
|
+
begin
|
65
|
+
activity_task.complete! result: activity_result.to_s unless activity_task.responded?
|
66
|
+
rescue RuntimeError
|
67
|
+
# this error sometimes appear if failing and completing happen very close in time and SWF doesn't report correctly the responded? status
|
68
|
+
Glider.logger.warn "Ignoring error responding to activity task failed. Most likely caused because your task failed the activity already."
|
69
|
+
end
|
64
70
|
rescue AWS::SimpleWorkflow::ActivityTask::CancelRequestedError
|
65
71
|
# cleanup after ourselves
|
66
72
|
activity_task.cancel!
|