faktory_worker_ruby 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/faktory/job.rb +6 -1
- data/lib/faktory/mutate.rb +6 -0
- data/lib/faktory/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a183f21103562c224add2460da73a145a0c12c32a167525fd18dd02fe334241
|
4
|
+
data.tar.gz: b7c76d7001ba133f685427ffcc00bcdd75d026747106fac705b741e57f3d7b94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bae416fa9d2675c586a8a40ccce0005f665eb2ab2bc19e6a5e12405cafee67aef22984d9e84f6db96012143eee87307d81e089fad5fd81d6dd278489fe62437
|
7
|
+
data.tar.gz: 42806775422a7542a1a7c7e912bc373dfe8c0d2b1d47d8cccb3ce8d91a0c1a95f8a835cb99cc1b9da2262d17ac3f50e7447ecefcf4eff6ba3ef0d9672e8b1f06
|
data/Changes.md
CHANGED
data/Gemfile.lock
CHANGED
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
|
107
|
+
Setter.new(options.merge('jobtype'.freeze => self))
|
103
108
|
end
|
104
109
|
|
105
110
|
def perform_async(*args)
|
data/lib/faktory/mutate.rb
CHANGED
@@ -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|
|
data/lib/faktory/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|