resque_solo 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/resque_solo/queue.rb +1 -1
- data/lib/resque_solo/unique_job.rb +2 -2
- data/lib/resque_solo/version.rb +1 -1
- 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: b7d4f959f0665b35ce76f33a23eef5e18aade292
|
4
|
+
data.tar.gz: c67470bf93eb65838599478b4aeafcef7801f81a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48bfa1dde895f27c45112dbb3e39b3fd54e9b91fafa9cc142b471b18c68be74d59ce67fe2357c8104eea5d7611e94eed061fa1b374874c561980cd5cc82caa88
|
7
|
+
data.tar.gz: c1459dca21cb192f986fdb8f447226d66794f4d26f3b666cf27fe525cbc59ae36eb83e47d55d012f14a6a2b5146ebcc1f7487ad79c170263781fc33547475df3
|
data/lib/resque_solo/queue.rb
CHANGED
@@ -52,7 +52,7 @@ module ResqueSolo
|
|
52
52
|
redis_queue = "queue:#{queue}"
|
53
53
|
|
54
54
|
redis.lrange(redis_queue, 0, -1).each do |string|
|
55
|
-
json =
|
55
|
+
json = Resque.decode(string)
|
56
56
|
next unless json['class'] == klass
|
57
57
|
next unless json['args'] == args if args.any?
|
58
58
|
ResqueSolo::Queue.mark_unqueued(queue, json)
|
@@ -11,14 +11,14 @@ module Resque
|
|
11
11
|
# Payload is what Resque stored for this job along with the job's class name:
|
12
12
|
# a hash containing :class and :args
|
13
13
|
def redis_key(payload)
|
14
|
-
payload =
|
14
|
+
payload = Resque.decode(Resque.encode(payload))
|
15
15
|
job = payload["class"]
|
16
16
|
args = payload["args"]
|
17
17
|
args.map! do |arg|
|
18
18
|
arg.is_a?(Hash) ? arg.sort : arg
|
19
19
|
end
|
20
20
|
|
21
|
-
Digest::MD5.hexdigest
|
21
|
+
Digest::MD5.hexdigest Resque.encode(class: job, args: args)
|
22
22
|
end
|
23
23
|
|
24
24
|
# The default ttl of a locking key is -1 (forever).
|
data/lib/resque_solo/version.rb
CHANGED