esse-async_indexing 0.1.0.rc1 → 0.1.0.rc3

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: 3f54f5e1cef1f47b69ce2c732fd011c0ef35a17cfd1e6caa6767f00dfd8e9409
4
+ data.tar.gz: 8b8fe14da90b51311999b7806785f88b87fa976b4608ed0f631ff70ee5755c88
5
5
  SHA512:
6
- metadata.gz: 20b7b5d815774e36d237d2273442546fa5289d45b4db187962c48da4e2f153219d1cc2439cb2461c75cdaff5b6ff0ceb8e27eacfe3c754f908a22300431c80f9
7
- data.tar.gz: 538588ff73ce223fbfbfb46e19d7b47ee8da1131734f0e6228ff0142adf13324ade2f31b94209538e94e8b8fffa85b28ef9644dbc71f8dcb1874410046da8659
6
+ metadata.gz: 3059199d52d8ade40c64938a2db4847dc84d86b8de0c8231485b636e78a69132474ae26471b680115606e19377f1a4b43cf2326e97c473a14734e590046837bf
7
+ data.tar.gz: 57b84cfd6102b70e34385785d818b1497ae12830db649b4cbe3e2fed00a1bdc5daa27ed4e5516908ed723c9795a12b22a2bbfa9e446a00c21c409365156bd5f9
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.rc3)
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
@@ -11,6 +11,8 @@ module Esse::AsyncIndexing::Actions
11
11
 
12
12
  index_class.delete(id: document_id, **bulk_opts)
13
13
  :deleted
14
+ rescue Esse::Transport::NotFoundError
15
+ :not_found
14
16
  end
15
17
  end
16
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.rc3"
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.rc3
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-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: esse