redis_dedupe 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f843426f3686b302607a640450f9a470a3f06581fdee7c437ba66762f4278940
4
- data.tar.gz: 35a3e2ae3b9987f8d1ea52f5fb78b2bd0bb9fdc5e404580623b853ce1ad91edc
3
+ metadata.gz: e7e1bf24e46a051a088620a2ffb0e52ab8ee16e545eb493d9aa8165535653404
4
+ data.tar.gz: 669458cb3c1a3970409babf024ebfb327f97bdc30171a5fc89e833bfe5168528
5
5
  SHA512:
6
- metadata.gz: 35b1cb0b792849b10f75fa4b26cc0825f7dac7f37a8239d628914fd12f5d8d713a4dfb482355c2da6ee7d8d7b7b8a5ffc8ff499a99abaf27d6843f488a85840a
7
- data.tar.gz: 5b9c8b0097bfa05fb9335cc29bdd3719da530f323f92539516cf9e994cb9b2d7af23f01471ff44dd2da09573419d8642b5fc2d420c9dc9466b007e30289ee6df
6
+ metadata.gz: a7c337626bb5e7e52da2f7023f6bf1ac815c5ec4920016eb7fda230d38c180f0d8b1801a27dabdce42eba7983253e99bbe4c65dad0acf6971333b59ac007ae06
7
+ data.tar.gz: 115a49bb415bf73cc85311421f400ed35cf50a059d354ad3aa0f2b41641d8a21a40870c92e1e6b47c5cee9fcc3ae6eed11b4e008f8d3bc28ca65368dda765fbc
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.6"
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.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Huynh
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-21 00:00:00.000000000 Z
11
+ date: 2024-10-22 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
@@ -110,7 +111,7 @@ homepage: ''
110
111
  licenses:
111
112
  - MIT
112
113
  metadata: {}
113
- post_install_message:
114
+ post_install_message:
114
115
  rdoc_options: []
115
116
  require_paths:
116
117
  - lib
@@ -125,8 +126,8 @@ 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
- signing_key:
129
+ rubygems_version: 3.0.3.1
130
+ signing_key:
130
131
  specification_version: 4
131
132
  summary: A weak deduper to make things like bulk email run safer.
132
133
  test_files: []