faktory_worker_ruby 2.1.0 → 2.1.1

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
  SHA256:
3
- metadata.gz: effc5e0683ad3dda06516e048c0855a9a7eabfeac799bc20340a01ea181c531e
4
- data.tar.gz: 76e824912d51ac9e9d53f8971076d8155dbb4c74448a3f47bdbba663bb824f9a
3
+ metadata.gz: 8df3ceda59c66e2bcb7d04f70fec7de89e6a6219f9159420a9500df7c8a0d35b
4
+ data.tar.gz: 258295f65b955167b9d89f66aada3b28675368d835362edef694bd50b10f57cd
5
5
  SHA512:
6
- metadata.gz: 24a4d33c1eb0b81ed82664d2b1ad4b8f3c0a608f49b567f89adfbed85bd2bdfc2d667b2745a997229cda9c06b81b19d552b5a852dc6ea70b563bf61e176b8819
7
- data.tar.gz: 6fa8af5d29d4eede89e51ef35be4a9e789a677518655e592a5c6ad95ab495e62443cd9a9b837cb88dba7f1b14aa326b1eec14eb0223c4ba9184093fb181fb5c3
6
+ metadata.gz: 0b02206889ca2ff8b57f3de485a880904b9eb8e422975e78ed23176e753b4cc5ce7d4eca76f65f7f9b0c49c0440503892e26cdc9f960d170a076f8d49570a4d1
7
+ data.tar.gz: 7e7065afe15d6308245131ab4524fd5d2accdf51590817c91cd83beededd356a3bc4e0132cfc42f1eeb2bfc13bb367eecf8087f6c225d4a939d2f05828709662
data/Changes.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changes
2
2
 
3
+ ## 2.1.1
4
+
5
+ - Add new `Faktory::Client#queue_latency` API
6
+ - Require OpenSSL for client
7
+ - Bump requirements for Ruby, Rails
8
+
3
9
  ## 2.1.0
4
10
 
5
11
  - Require ActiveJob 7.0+, connection_pool 2.5+
data/README.md CHANGED
@@ -34,10 +34,10 @@ server part is [here](https://github.com/contribsys/faktory/)
34
34
 
35
35
  ## Requirements
36
36
 
37
- * Ruby 2.7 or higher
38
- * Faktory 1.8 or higher [Installation](https://github.com/contribsys/faktory/wiki/Installation)
37
+ * Ruby 3.2 or higher
38
+ * Faktory 1.9 or higher [Installation](https://github.com/contribsys/faktory/wiki/Installation)
39
39
 
40
- Optionally, Rails 6.0+ for ActiveJob.
40
+ Optionally, Rails 7.0+ for ActiveJob.
41
41
 
42
42
  ## Installation
43
43
 
@@ -5,6 +5,7 @@ require "cgi"
5
5
  require "digest"
6
6
  require "securerandom"
7
7
  require "faktory/io"
8
+ require "openssl"
8
9
 
9
10
  module Faktory
10
11
  class BaseError < StandardError; end
@@ -158,6 +159,15 @@ module Faktory
158
159
  end
159
160
  end
160
161
 
162
+ def queue_latency(*queues)
163
+ qs = Array(queues)
164
+ raise ArgumentError, "no queue given" if qs.empty?
165
+ transaction do
166
+ command "QUEUE LATENCY", qs.join(" ")
167
+ JSON.parse(result!)
168
+ end
169
+ end
170
+
161
171
  # Push a hash corresponding to a job payload to Faktory.
162
172
  # Hash must contain "jid", "jobtype" and "args" elements at minimum.
163
173
  # Returned value will either be the JID String if successful OR
@@ -251,7 +261,6 @@ module Faktory
251
261
  def open_socket
252
262
  tlserrors = []
253
263
  if tls?
254
- require "openssl"
255
264
  tlserrors << ::OpenSSL::SSL::SSLError
256
265
  sock = TCPSocket.new(@location.hostname, @location.port)
257
266
  sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, true)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Faktory
4
- VERSION = "2.1.0"
4
+ VERSION = "2.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faktory_worker_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham