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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b653bbf167cdd607c577a66082e832b738bff2c
4
- data.tar.gz: 8907af6d186653c0c8aa4654f26d67a1ebb32e36
3
+ metadata.gz: 942daad303f059b635baba885e7cfc1a4f143403
4
+ data.tar.gz: 2f80d4b0769547407f87ed909951074760dc0e5f
5
5
  SHA512:
6
- metadata.gz: cd70ce4a2aa250d2cb455379e20b07e505c2b2f2c11fd2a63a69441a19c4fc998eb40a2fd5d7735fcfb9f9270b2eaafc4156f4db30b06843ad576553191d0df5
7
- data.tar.gz: f90d93362a33c0dac6744ee4453691b7b877e1d3b90983330b69a440b7d06a7d7ef403194b889a5ac566781856a13253b98fe27d7b634a5825a95e8870daa725
6
+ metadata.gz: 079fbb53981ab9a4cf19eb990e16bf577dda9920440958832ba4e99e44bccf834fe8aa6c1b0512072cbbc057aa935d678679299d7d081510a941a813b09d3bae
7
+ data.tar.gz: b73d5c0a1e4aa84555760be15bb4ebae20b097042e87b656a421cadb7934e3f63878dd526d3ef1a6c7f85caebbf00ddf245bf9dd3469c6da413860db1c22ba64
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -3,4 +3,4 @@ source 'https://rubygems.org'
3
3
  gem 'pry'
4
4
  gem 'aws-sdk'
5
5
  gem 'colorize'
6
- gem 'glider', '0.1.5'#, path: '../pkg/'
6
+ gem 'glider', '0.1.6'#, path: '../pkg/'
@@ -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.5)
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.5)
43
+ glider (= 0.1.6)
44
44
  pry
@@ -8,7 +8,6 @@ class MySWF < Glider::Component
8
8
  register_activity :hello_world, '1.5'
9
9
 
10
10
  def hello_world(input)
11
- binding.pry
12
11
  task.fail! reason: "BECAUSE!" and return
13
12
  $logger.warn "Executing hello_world."
14
13
  sleep 2
@@ -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
@@ -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 ruby lib
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.5"
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"]
@@ -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
- activity_result = target_instance.send activity_type.name, process_input(activity_task.input)
63
- activity_task.complete! result: activity_result.to_s unless activity_task.responded?
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!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Pelaez