allq 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8314dee49b0fc43d6bb1e22bbdfe661a6640d38f
4
- data.tar.gz: e1d5c630022f4e39f20b6b10cf7fc526e984b879
3
+ metadata.gz: '089a863cd091965dc37950a0a320af94188e2c28'
4
+ data.tar.gz: '038c6a4707a94fd07f2dabe30f302efbbe744281'
5
5
  SHA512:
6
- metadata.gz: ca6328be5bae7a8cccab96fa6aa40476cd336db6aaad138551bcecb88988e7c2c3b069c5f93a5ec6a75b3e2ab8beb1ba3d45714b5a41ef22a90a43dde07d2eff
7
- data.tar.gz: 88cabd7165e6d522730ec3815fa18ea67b4a587df296bfea3aeaf1a2bbfa9c98cb61f64ed8b2890b27800033ed9ee4f7c8ca3e7e5f3aa0c11ae853d7b4bf0631
6
+ metadata.gz: 836ede28d65728ab4b1aa3a3f2cac326ff3a245f7ec8a9897399a6bae0b4d5de2d262b6ca8e97d3321875ab6c83de5004b7d18ab72c7057eefab9745886b4b92
7
+ data.tar.gz: ac2bac87b73031f2d75ed0e5655f18ade042198d52a52219177a906377d41363be6c354f2621bb145297ff14c05f0adf3e5ad6ff5fb9f8eed2abef83d7b9028d
@@ -10,7 +10,7 @@ class AllQ
10
10
 
11
11
  result = JSON.parse(data)
12
12
  if result['job']
13
- return nil if result['job'].to_s == "{}"
13
+ return nil if result['job'].empty?
14
14
  job = Job.new_from_hash(result['job'])
15
15
  return job
16
16
  end
@@ -49,7 +49,6 @@ class AllQ
49
49
  _with_retry(options[:retry_interval], options[:init]) do
50
50
  @mutex.synchronize do
51
51
  _raise_not_connected! unless @connection
52
- command = command.force_encoding('ASCII-8BIT') if command.respond_to?(:force_encoding)
53
52
  @connection.puts(command.to_s)
54
53
  res = @connection.readline
55
54
  yield block.call(res)
@@ -111,7 +110,6 @@ class AllQ
111
110
  Errno::ECONNREFUSED => ex
112
111
 
113
112
  _reconnect(ex, retry_interval)
114
- _initialize_tubes if init
115
113
  retry
116
114
  end
117
115
 
data/lib/allq/job.rb CHANGED
@@ -64,7 +64,9 @@ class AllQ
64
64
  job = Job.new(id, q_server, tube, body, expired_count)
65
65
  return job
66
66
  rescue => ex
67
- puts 'Invalid job data i'
67
+ puts "Server value: #{hash}"
68
+ puts "Can't create job, version mismatch?"
69
+ puts "Invalid job data #{ex.message}"
68
70
  end
69
71
 
70
72
 
data/lib/allq/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Allq
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason