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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1ef30a085579575c5f402c14e17dcc5ea978422
4
- data.tar.gz: 6a836d44d8a6b97145576eb7431a3d7a46b4280d
3
+ metadata.gz: b7d4f959f0665b35ce76f33a23eef5e18aade292
4
+ data.tar.gz: c67470bf93eb65838599478b4aeafcef7801f81a
5
5
  SHA512:
6
- metadata.gz: feb8bebe5927a2a4d44333a01cd975f462b81d4a65383f2b3ea3a985937f37020269a1a2b13fe2fca6a1531600f715c35a85a24f118944f005a3993b1e720ed8
7
- data.tar.gz: 0bce6bcf55e8cb0fe344257b722d724430a4ce9025f850071e9284f5801fcda1bcb8ee4bb9a9b96eb03a86e41d9a69e66e645a9bf5cd29e24f2fb3f0961f4982
6
+ metadata.gz: 48bfa1dde895f27c45112dbb3e39b3fd54e9b91fafa9cc142b471b18c68be74d59ce67fe2357c8104eea5d7611e94eed061fa1b374874c561980cd5cc82caa88
7
+ data.tar.gz: c1459dca21cb192f986fdb8f447226d66794f4d26f3b666cf27fe525cbc59ae36eb83e47d55d012f14a6a2b5146ebcc1f7487ad79c170263781fc33547475df3
@@ -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 = JSON.parse(string)
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 = JSON.parse(JSON.generate(payload)) # todo - .stringify_keys
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 JSON.generate(class: job, args: args)
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).
@@ -1,3 +1,3 @@
1
1
  module ResqueSolo
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque_solo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tee Parham