search-engine-for-typesense 30.1.8.0 → 30.1.8.2

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: '0852da3905487de90a84633634760fba6d4806d236e6738a8404d70e9122eef4'
4
- data.tar.gz: fe62daa0161f71c0b5bc24da4195708a96b1687bc096383a12056aa346178710
3
+ metadata.gz: e6ab09e7d02193a7f30842796381569a79cc89beb95cb274097877d957494e92
4
+ data.tar.gz: 9ec75fa9b98df1de5c7abbf141f45e56d16e0eac41f2802087515ee31c4bd1fc
5
5
  SHA512:
6
- metadata.gz: 6c12c7c80626ac24ea4fd5515559d354632a42a0bcd2381d61ed577aa3e24e6e60448cdf810defdf00d819e8960c93a69ce5129e27225a76c6a476e0b62115c4
7
- data.tar.gz: 405565a325c099df28ba1d54d85a308f5297299a59eb40cd9f03a24ebb8306f588becc7c31be5d82cb3be05216cb443dd39a1152d417e07da2b64b97162cbe2a
6
+ metadata.gz: f916255418a47e8c8c8aa55dffaa701967ee092f5e2c8e2c6a3bc9f7f0106ad318053681fe2899669af2df0850b1a6b223a418eb301683e66599c5d3eca8c0a1
7
+ data.tar.gz: f22af0553d99b19fc9ab1f0dda24a8d10be80421844c4282038971e7273babec79d19a995d2465f90cc8a92cc0d470d79b38eadbfd7654599335f18e7fdde0e5
@@ -43,9 +43,9 @@ module SearchEngine
43
43
  run_store = indexing_run_store(run_id)
44
44
  partition_key ||= SearchEngine::IndexingRun.partition_key(partition) if run_id
45
45
  run_store&.mark_started(run_id: run_id, partition_key: partition_key, job_id: job_id)
46
- instrument('search_engine.dispatcher.job_started',
47
- payload.merge(queue: queue_name, job_id: job_id, metadata: metadata)
48
- )
46
+ instrument_event('search_engine.dispatcher.job_started',
47
+ payload.merge(queue: queue_name, job_id: job_id, metadata: metadata)
48
+ )
49
49
 
50
50
  started = monotonic_ms
51
51
  summary = nil
@@ -55,7 +55,7 @@ module SearchEngine
55
55
  duration = (monotonic_ms - started).round(1)
56
56
  run_store&.mark_succeeded(run_id: run_id, partition_key: partition_key, summary: summary)
57
57
 
58
- instrument(
58
+ instrument_event(
59
59
  'search_engine.dispatcher.job_finished',
60
60
  payload.merge(queue: queue_name, job_id: job_id, duration_ms: duration, status: summary.status,
61
61
  metadata: metadata
@@ -101,7 +101,7 @@ module SearchEngine
101
101
  end
102
102
 
103
103
  wait_seconds = policy.next_delay(attempt_no + 1, error)
104
- instrument(
104
+ instrument_event(
105
105
  'search_engine.dispatcher.job_error',
106
106
  error_payload(error).merge(queue: queue_name, job_id: job_id, retry_after_s: wait_seconds)
107
107
  )
@@ -141,7 +141,7 @@ module SearchEngine
141
141
  end
142
142
 
143
143
  def instrument_error(error, payload: nil)
144
- instrument(
144
+ instrument_event(
145
145
  'search_engine.dispatcher.job_error',
146
146
  (payload || {}).merge(queue: queue_name, job_id: job_id, error_class: error.class.name,
147
147
  message_truncated: error.message.to_s[0, 200]
@@ -149,7 +149,7 @@ module SearchEngine
149
149
  )
150
150
  end
151
151
 
152
- def instrument(event, payload)
152
+ def instrument_event(event, payload)
153
153
  SearchEngine::Instrumentation.instrument(event, payload) {}
154
154
  end
155
155
 
@@ -157,7 +157,10 @@ module SearchEngine
157
157
  def run_single_collection(mode, klass, stage)
158
158
  case mode.to_sym
159
159
  when :index
160
- stage == :cascade ? klass.index_collection(pre: :ensure, force_rebuild: true) : klass.index_collection
160
+ options = { force_rebuild: true }
161
+ options[:pre] = :ensure if stage == :cascade
162
+
163
+ klass.index_collection(**options)
161
164
  else
162
165
  klass.reindex_collection!
163
166
  end
@@ -3,5 +3,5 @@
3
3
  module SearchEngine
4
4
  # Current gem version.
5
5
  # @return [String]
6
- VERSION = '30.1.8.0'
6
+ VERSION = '30.1.8.2'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search-engine-for-typesense
3
3
  version: !ruby/object:Gem::Version
4
- version: 30.1.8.0
4
+ version: 30.1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Shkoda