esse-async_indexing 0.1.0.rc1 → 0.1.0.rc2

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: 50b00ff520d7e52425dd2b97ff0ce4cf7f3f7c2bd8275ef2a36d290e9ca3165e
4
- data.tar.gz: 5ad4d7445414dcc7c9cc670fa348ee26d4cd589aa71e9c84a331ce7d848e43b1
3
+ metadata.gz: 4126b3227cf9496930c3bf16dcc98b3e29df70582acbd2793f7521ef7b36bb91
4
+ data.tar.gz: b4d59d3c2cb659bee4390a7317b2a849af4026746f8afb10757b284e64afbafb
5
5
  SHA512:
6
- metadata.gz: 20b7b5d815774e36d237d2273442546fa5289d45b4db187962c48da4e2f153219d1cc2439cb2461c75cdaff5b6ff0ceb8e27eacfe3c754f908a22300431c80f9
7
- data.tar.gz: 538588ff73ce223fbfbfb46e19d7b47ee8da1131734f0e6228ff0142adf13324ade2f31b94209538e94e8b8fffa85b28ef9644dbc71f8dcb1874410046da8659
6
+ metadata.gz: e06a9c54ec5ab021cf43d1a0d8e82f19dff47aa69ff8fe3f577c043b386be6ae6e14bd73e571c86ae9b219071c388df5c0e972ba35e40c7640a57111eb2081f6
7
+ data.tar.gz: ae5cc98e69c55fe73322dc8c401af0bd65df91ffcc3205d09e325cacf48b8f6824d7bf0318a53ec54f16407347cdce63eeefd0a31d72620a1127b7be954ccf51
data/Gemfile.lock CHANGED
@@ -10,9 +10,9 @@ GIT
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- esse-async_indexing (0.1.0.rc1)
13
+ esse-async_indexing (0.1.0.rc2)
14
14
  background_job
15
- esse (>= 0.4.0.rc01)
15
+ esse (>= 0.4.0.rc1)
16
16
  multi_json
17
17
 
18
18
  GEM
@@ -6,8 +6,13 @@ module Esse::AsyncIndexing::Actions
6
6
  _index_class, repo_class = CoerceIndexRepository.call(index_class_name, repo_name)
7
7
  kwargs = Esse::HashUtils.deep_transform_keys(options, &:to_sym)
8
8
 
9
- attr_name = repo_class.lazy_document_attributes.keys.find { |key| key.to_s == attr_name.to_s }
10
- repo_class.update_documents_attribute(attr_name, ids, **kwargs)
9
+ real_attr_name = repo_class.lazy_document_attribute_names(attr_name).first
10
+ if real_attr_name.nil? # let the job fail? or log and return?
11
+ Esse.logger.warn("Lazy attribute #{attr_name.inspect} not found in `#{repo_name}` repository of `#{index_class_name}` index.")
12
+ return
13
+ end
14
+
15
+ repo_class.update_documents_attribute(real_attr_name, ids, **kwargs)
11
16
  ids
12
17
  end
13
18
  end
@@ -71,7 +71,7 @@ class Esse::AsyncIndexing::CLI::AsyncUpdateLazyAttributes < Esse::CLI::Index::Ba
71
71
  end
72
72
 
73
73
  def repo_attributes(repo)
74
- return repo.lazy_document_attributes.keys if attributes.empty?
74
+ return repo.lazy_document_attribute_names(true) if attributes.empty?
75
75
 
76
76
  repo.lazy_document_attribute_names(attributes)
77
77
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Esse
4
4
  module AsyncIndexing
5
- VERSION = "0.1.0.rc1"
5
+ VERSION = "0.1.0.rc2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esse-async_indexing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc1
4
+ version: 0.1.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos G. Zimmermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-26 00:00:00.000000000 Z
11
+ date: 2024-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: esse