sidekiq-promise 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq/promise/version.rb +1 -1
- data/lib/sidekiq/promise/worker.rb +1 -13
- data/sidekiq-promise.gemspec +1 -1
- data/spec/workers/promising_valuable_worker.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5559573e9c541f6a3feb79157d5c1ddb91bcbfc
|
4
|
+
data.tar.gz: 2ccfb1bd305a828308bf7cf4ac02a5a0a84aab27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be3f09db0e599160ab08190ebf3c7c3ceedb45194d3fb7a992ddb7226a67bf50a773c5439b843787e8e2d16edc18216b3f50365c88a8d16d2cf805e5a2b6dec5
|
7
|
+
data.tar.gz: 6d9b1b7a3756c7adb2667563718d30ebce1437d70e3e9219a17b7ffca729d1fb1a61d951b1b5cfe0d8cea6591898258a1493c317b13a4a29861a3d2e2efb775f
|
@@ -8,23 +8,11 @@ module Sidekiq
|
|
8
8
|
@worker_klass = worker_klass
|
9
9
|
@args = args
|
10
10
|
|
11
|
-
|
12
|
-
block = proc do
|
13
|
-
this.send :subscribe
|
14
|
-
end
|
15
|
-
super block
|
11
|
+
super proc { subscribe }
|
16
12
|
end
|
17
13
|
|
18
14
|
private
|
19
15
|
|
20
|
-
def evaluate_promise &block
|
21
|
-
begin
|
22
|
-
block.call ::MrDarcy::Promise::DSL.new(self)
|
23
|
-
rescue Exception => e
|
24
|
-
reject e
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
16
|
def subscribe
|
29
17
|
@redis = Sidekiq.redis_pool.checkout
|
30
18
|
@redis.subscribe ::Sidekiq::Promise::Middleware::CHANNEL do |on|
|
data/sidekiq-promise.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-promise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Harton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '>='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
145
|
+
version: 0.4.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
152
|
+
version: 0.4.0
|
153
153
|
description: Treat Sidekiq jobs as asynchronous promises.
|
154
154
|
email:
|
155
155
|
- james@resistor.io
|