shoryuken-later 0.0.5.3 → 0.0.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZGU2ZmZlMzE1Y2U3YjE5ZWFlMzlkNmY1NzkwYzE3OTU4MmY3Y2Y5Zg==
5
- data.tar.gz: !binary |-
6
- OWU1NjQwOTY5M2E4ZTQwNWM3OTBjOWJiMjFmMjdiZGQ4ZTlkZTJjNg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YjEzZGMwNzcwYjY4NzE4NGJmN2E3NTc4YmNhZTFlZWRjNWJjNDg0MmIwYmM5
10
- MzRkYzk0NDhhNzgzY2Q2YTM0N2Y2ZTk3YWY1ODc0YWFmYmYxMmQ3ZjdlOWU1
11
- NzlmZWQwMWIyZTQ5MWE1ZWU5ZDM1ODhiZjcyNDU2YmIzZGJjZDE=
12
- data.tar.gz: !binary |-
13
- NjExYzQ0YWI1YjYyOWFiMmE5ZjdiNzRkZTZhZmM3Nzk0ZDEzZGNjYzk1OWVi
14
- MjYzNGYzMTExMTZhMzAzYzJlMGZlZWE5MGMwOTlmNzk1M2U2YzgzMWQwNDM0
15
- ZmVkNGU2NzIwOTRlZGMyMzNjZjhjZjYwNzdlZDU5ZjVjYzE2NTE=
2
+ SHA1:
3
+ metadata.gz: 6ddee2c4f752e577a58318adb619953bb2f59481
4
+ data.tar.gz: 15ceff15183b969a80c881efa19ad7682e2b70df
5
+ SHA512:
6
+ metadata.gz: 773be98b8d0268b9d44be8186ce3e3762c33ab7d220fcb14d196c8a781156a5e7bc45189c8d55cd55ace3c6c7666a0ae0c617d9dfd4625ec0048d41132a76a29
7
+ data.tar.gz: b529a8387cde89f23e8ed5dffd489498eb0e024a82195f5732fb366fe2529369ab83a9c4af4eadf7780c106e107ea188bb5961a783debdd09f52f0398af3fdee
data/Rakefile CHANGED
@@ -10,4 +10,20 @@ begin
10
10
  task :default => :spec
11
11
  rescue LoadError
12
12
  # no rspec available
13
- end
13
+ end
14
+
15
+ desc 'Open Shoryuken::Later pry console'
16
+ task :console do
17
+ require 'pry'
18
+ require 'shoryuken-later'
19
+
20
+ config_file = File.join File.expand_path('..', __FILE__), 'shoryuken.yml'
21
+
22
+ if File.exist? config_file
23
+ config = YAML.load File.read(config_file)
24
+ AWS.config(config['aws'])
25
+ end
26
+
27
+ ARGV.clear
28
+ Pry.start
29
+ end
@@ -12,7 +12,8 @@ module Shoryuken
12
12
  attr_accessor :manager
13
13
 
14
14
  def initialize
15
- @manager = Shoryuken::Later::Manager.new_link
15
+ @condvar = Celluloid::Condition.new
16
+ @manager = Shoryuken::Later::Manager.new_link(@condvar)
16
17
 
17
18
  @done = false
18
19
  end
@@ -22,7 +23,8 @@ module Shoryuken
22
23
  @done = true
23
24
 
24
25
  manager.async.stop(shutdown: !!options[:shutdown], timeout: Shoryuken::Later.options[:timeout])
25
- manager.wait(:shutdown)
26
+ @condvar.wait
27
+ manager.terminate
26
28
  end
27
29
  end
28
30
 
@@ -10,8 +10,9 @@ module Shoryuken
10
10
  include Celluloid
11
11
  include Shoryuken::Util
12
12
 
13
- def initialize
13
+ def initialize(condvar)
14
14
  @tables = Shoryuken::Later.tables.dup.uniq
15
+ @finished = condvar
15
16
 
16
17
  @done = false
17
18
 
@@ -49,7 +50,7 @@ module Shoryuken
49
50
  @idle.clear
50
51
 
51
52
  if @busy.empty?
52
- return after(0) { signal(:shutdown) }
53
+ return after(0) { @finished.signal }
53
54
  end
54
55
 
55
56
  if options[:shutdown]
@@ -109,7 +110,7 @@ module Shoryuken
109
110
  if @busy.size > 0
110
111
  after(delay) { soft_shutdown(delay) }
111
112
  else
112
- after(0) { signal(:shutdown) }
113
+ @finished.signal
113
114
  end
114
115
  end
115
116
 
@@ -129,7 +130,7 @@ module Shoryuken
129
130
  end
130
131
  end
131
132
  end
132
- after(0) { signal(:shutdown) }
133
+ @finished.signal
133
134
  end
134
135
  end
135
136
  end
@@ -1,5 +1,5 @@
1
1
  module Shoryuken
2
2
  module Later
3
- VERSION = '0.0.5.3'
3
+ VERSION = '0.0.5.4'
4
4
  end
5
5
  end
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "bundler", '>= 1.3.5'
26
26
  spec.add_development_dependency "rake", '~> 10.0'
27
27
  spec.add_development_dependency "rspec", '~> 3.0', '< 3.1'
28
+ spec.add_development_dependency "pry-byebug"
28
29
 
29
30
  spec.add_dependency "aws-sdk-v1"
30
31
  spec.add_dependency "celluloid", "~> 0.16.0"
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoryuken-later
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.3
4
+ version: 0.0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Khoobyar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-10 00:00:00.000000000 Z
11
+ date: 2015-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.3.5
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.3.5
27
27
  - !ruby/object:Gem::Dependency
@@ -58,18 +58,32 @@ dependencies:
58
58
  - - <
59
59
  - !ruby/object:Gem::Version
60
60
  version: '3.1'
61
+ - !ruby/object:Gem::Dependency
62
+ name: pry-byebug
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: aws-sdk-v1
63
77
  requirement: !ruby/object:Gem::Requirement
64
78
  requirements:
65
- - - ! '>='
79
+ - - '>='
66
80
  - !ruby/object:Gem::Version
67
81
  version: '0'
68
82
  type: :runtime
69
83
  prerelease: false
70
84
  version_requirements: !ruby/object:Gem::Requirement
71
85
  requirements:
72
- - - ! '>='
86
+ - - '>='
73
87
  - !ruby/object:Gem::Version
74
88
  version: '0'
75
89
  - !ruby/object:Gem::Dependency
@@ -100,8 +114,8 @@ dependencies:
100
114
  - - ~>
101
115
  - !ruby/object:Gem::Version
102
116
  version: 0.0.5
103
- description: ! "\n This gem provides a scheduling plugin (using Dynamo DB) for
104
- Shoryuken, as well as an ActiveJob adapter\n "
117
+ description: "\n This gem provides a scheduling plugin (using Dynamo DB) for Shoryuken,
118
+ as well as an ActiveJob adapter\n "
105
119
  email:
106
120
  - joe@khoobyar.name
107
121
  executables:
@@ -140,17 +154,17 @@ require_paths:
140
154
  - lib
141
155
  required_ruby_version: !ruby/object:Gem::Requirement
142
156
  requirements:
143
- - - ! '>='
157
+ - - '>='
144
158
  - !ruby/object:Gem::Version
145
159
  version: 2.0.0
146
160
  required_rubygems_version: !ruby/object:Gem::Requirement
147
161
  requirements:
148
- - - ! '>='
162
+ - - '>='
149
163
  - !ruby/object:Gem::Version
150
164
  version: '0'
151
165
  requirements: []
152
166
  rubyforge_project:
153
- rubygems_version: 2.0.3
167
+ rubygems_version: 2.4.5
154
168
  signing_key:
155
169
  specification_version: 4
156
170
  summary: A scheduling plugin (using Dynamo DB) for Shoryuken
@@ -159,3 +173,4 @@ test_files:
159
173
  - spec/shoryuken/later/poller_spec.rb
160
174
  - spec/shoryuken/worker_spec.rb
161
175
  - spec/spec_helper.rb
176
+ has_rdoc: