faktory_worker_ruby 1.0.2 → 1.0.3

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: 804ff26f314376744d731cc7bae95efdfda57c9d835ebc32fed9efbfcd5c813d
4
- data.tar.gz: 70758dc5254f96908ff969342a30e8ccdef261e1a813b1aeb30993b7df9c4e4e
3
+ metadata.gz: 2a183f21103562c224add2460da73a145a0c12c32a167525fd18dd02fe334241
4
+ data.tar.gz: b7c76d7001ba133f685427ffcc00bcdd75d026747106fac705b741e57f3d7b94
5
5
  SHA512:
6
- metadata.gz: 10024bc0283cd638063ba48d54887d9f8b65aaf059a726edf40a9fe0e40dd870eced9713746e2a60db397e4057881132a939e7296277c93916b4b40de8b7ab44
7
- data.tar.gz: da7660a768934e05240f5b6e228bc6a7f6dff31557127f0391f29a9c8d8c3a1bfc307235dda97f233a2d051832f9f9ff166bf9511283cfc45bd23f432e2cfc55
6
+ metadata.gz: 6bae416fa9d2675c586a8a40ccce0005f665eb2ab2bc19e6a5e12405cafee67aef22984d9e84f6db96012143eee87307d81e089fad5fd81d6dd278489fe62437
7
+ data.tar.gz: 42806775422a7542a1a7c7e912bc373dfe8c0d2b1d47d8cccb3ce8d91a0c1a95f8a835cb99cc1b9da2262d17ac3f50e7447ecefcf4eff6ba3ef0d9672e8b1f06
data/Changes.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 1.0.3
4
+
5
+ - Fix corruption in `custom` hash elements [#55]
6
+
3
7
  ## 1.0.2
4
8
 
5
9
  - Fix "batch not open" errors
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- faktory_worker_ruby (1.0.1)
4
+ faktory_worker_ruby (1.0.2)
5
5
  connection_pool (~> 2.2, >= 2.2.2)
6
6
 
7
7
  GEM
data/lib/faktory/job.rb CHANGED
@@ -88,6 +88,11 @@ module Faktory
88
88
  pool = Thread.current[:faktory_via_pool] || item["pool"] || Faktory.server_pool
89
89
  item.delete("pool")
90
90
 
91
+ # the payload hash is shallow copied by `merge` calls BUT we don't deep clone
92
+ # the 'custom' child hash which can be problematic if we mutate it within middleware.
93
+ # Proactively dup it first.
94
+ item["custom"] = item["custom"].dup if item["custom"]
95
+
91
96
  Faktory.client_middleware.invoke(item, pool) do
92
97
  pool.with do |c|
93
98
  c.push(item)
@@ -99,7 +104,7 @@ module Faktory
99
104
  module ClassMethods
100
105
 
101
106
  def set(options)
102
- Setter.new(options.merge!('jobtype'.freeze => self))
107
+ Setter.new(options.merge('jobtype'.freeze => self))
103
108
  end
104
109
 
105
110
  def perform_async(*args)
@@ -1,5 +1,11 @@
1
1
  require 'faktory/client'
2
2
 
3
+ ##
4
+ #
5
+ # Faktory's MUTATE API allows you to scan the sorted sets
6
+ # within Redis (retries, scheduled, dead) and take action
7
+ # (delete, enqueue, kill) on entries.
8
+ #
3
9
  # require 'faktory/mutate'
4
10
  # cl = Faktory::Client.new
5
11
  # cl.discard(Faktory::RETRIES) do |filter|
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Faktory
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faktory_worker_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-04 00:00:00.000000000 Z
11
+ date: 2021-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool