redis_dedupe 0.0.4 → 0.0.5

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: f843426f3686b302607a640450f9a470a3f06581fdee7c437ba66762f4278940
4
- data.tar.gz: 35a3e2ae3b9987f8d1ea52f5fb78b2bd0bb9fdc5e404580623b853ce1ad91edc
3
+ metadata.gz: 159791cf789f3fe8a961e3c0c5fb8ae6b484188ed60103f70d0b2bd2503f3465
4
+ data.tar.gz: 4b014db8329c328cd4b73cb0375aacecb28b348d303631bd1244f763b9811f44
5
5
  SHA512:
6
- metadata.gz: 35b1cb0b792849b10f75fa4b26cc0825f7dac7f37a8239d628914fd12f5d8d713a4dfb482355c2da6ee7d8d7b7b8a5ffc8ff499a99abaf27d6843f488a85840a
7
- data.tar.gz: 5b9c8b0097bfa05fb9335cc29bdd3719da530f323f92539516cf9e994cb9b2d7af23f01471ff44dd2da09573419d8642b5fc2d420c9dc9466b007e30289ee6df
6
+ metadata.gz: d525826e14962d81846cdaa05d75ac4f9b4dced5a74ad46f833b6ae1e6a2990e5bd5a82093c03b8cf5458fe19cdde2f495bb41e8267f7edca984eb258483859f
7
+ data.tar.gz: f781e9ac1f80bbbfcdfc5d54db8fde3df894c2e6b8f408429f498ee2d532bbc78aaf559bbf48a8a6c810cb85a624c732e76b7733d5ff0b4af7c4ee4bceb10714
data/catalog-info.yaml ADDED
@@ -0,0 +1,20 @@
1
+ apiVersion: backstage.io/v1alpha1
2
+ kind: Component
3
+ metadata:
4
+ name: redis-dedupe
5
+ description: |
6
+ This is a weak deduper to make things like bulk email run safer. It is not a lock safe for financial/security needs because it uses a weak redis locking pattern that can have race conditions. However, imagine a bulk email job that loops over 100 users, and enqueues a background email for each user. If the job fails at iteration 50, a retry would enqueue all the users again and many will receive dupes. This would continue multiple times as the parent job continued to rerun. By marking that a subjob has been enqueued, we can let that isolated job handle its own failures, and the batch enqueue job can run multiple times without re-enqueueing the same subjobs.
7
+ tags:
8
+ - gem
9
+ - ruby
10
+ - rails
11
+ - redis
12
+ - dedupe
13
+ annotations:
14
+ backstage.io/source-location: url:https://github.com/Kajabi/redis_dedupe/tree/master
15
+ github.com/project-slug: Kajabi/redis_dedupe
16
+ spec:
17
+ system: kajabi-products
18
+ type: gem
19
+ owner: standard-model
20
+ lifecycle: production
@@ -1,3 +1,3 @@
1
1
  module RedisDedupe
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/redis_dedupe.rb CHANGED
@@ -17,9 +17,9 @@ module RedisDedupe
17
17
  end
18
18
 
19
19
  def check(member)
20
- results = redis.pipelined do
21
- redis.sadd(key, member)
22
- redis.expire(key, expires_in)
20
+ results = redis.pipelined do |pipeline|
21
+ pipeline.sadd(key, member)
22
+ pipeline.expire(key, expires_in)
23
23
  end
24
24
 
25
25
  if results[0]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_dedupe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Huynh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-21 00:00:00.000000000 Z
11
+ date: 2023-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,6 +100,7 @@ files:
100
100
  - LICENSE.txt
101
101
  - README.md
102
102
  - Rakefile
103
+ - catalog-info.yaml
103
104
  - lib/redis_dedupe.rb
104
105
  - lib/redis_dedupe/version.rb
105
106
  - redis_dedupe.gemspec
@@ -125,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
126
  - !ruby/object:Gem::Version
126
127
  version: '0'
127
128
  requirements: []
128
- rubygems_version: 3.1.2
129
+ rubygems_version: 3.4.10
129
130
  signing_key:
130
131
  specification_version: 4
131
132
  summary: A weak deduper to make things like bulk email run safer.