bushpig 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/gemset.nix +1 -1
- data/lib/bushpig/client.rb +10 -9
- data/lib/bushpig/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50478f11ab72c719f2b8ef316866f3822370b9680bbf926b66ee6e981688057e
|
4
|
+
data.tar.gz: 7a5e2e7b548556b6484a8d2b5998cc5eb59b167023a972628c44a23646fe6cbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2f3d17d804d1de3e378274408c8109c9dd26895249624ed175ea3f2fcbb0ac52410931f5c0d09378306595c44060abe3bc2875737d95d84f04192d4dfe06b29
|
7
|
+
data.tar.gz: 588e4f398d33a51e15264b15709a45523f75a954f283d73317551e5f089a609bfdbd489f0c604eacd5c12136ca00edd6cf8a2a0cc44e35a72b1d25b214e19330
|
data/Gemfile.lock
CHANGED
data/gemset.nix
CHANGED
data/lib/bushpig/client.rb
CHANGED
@@ -19,15 +19,16 @@ module Bushpig
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def submit(queue, job, score: default_score, ttl: default_ttl)
|
22
|
-
if Bushpig.testing
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
22
|
+
new = if Bushpig.testing
|
23
|
+
job.handle
|
24
|
+
true
|
25
|
+
else
|
26
|
+
redis_pool.with do |conn|
|
27
|
+
conn.set(Bushpig.job_key(job.job_key), job.job_payload, ex: ttl)
|
28
|
+
conn.zadd(Bushpig.queue_key(queue), score, job.job_key)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
@callback.call(job, new)
|
31
32
|
end
|
32
33
|
end
|
33
34
|
end
|
data/lib/bushpig/version.rb
CHANGED