Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
ruby-version: '3.4'
- name: Build
run: |
bundler install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ruby-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
ruby-version: '3.4'
Comment thread
sergio-bobillier marked this conversation as resolved.
- name: Install Gems
run: |
bundler install
Expand Down
11 changes: 9 additions & 2 deletions lib/jay_api/elasticsearch/async.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# failures
def delete_by_query(query, slices: 5)
Concurrent::Promise.execute do
async_response = index.delete_by_query(query, slices: slices, wait_for_completion: false)
async_response = index.delete_by_query(query, slices:, wait_for_completion: false)
result = tasks.by_id(async_response[:task])
validate_result(result)
result
Expand All @@ -49,14 +49,21 @@

private


Check warning on line 52 in lib/jay_api/elasticsearch/async.rb

View workflow job for this annotation

GitHub Actions / lint

[rubocop] reported by reviewdog 🐶 Extra blank line detected. Raw Output: lib/jay_api/elasticsearch/async.rb:52:1: C: Layout/EmptyLines: Extra blank line detected.

Check warning on line 53 in lib/jay_api/elasticsearch/async.rb

View workflow job for this annotation

GitHub Actions / lint

[rubocop] reported by reviewdog 🐶 Extra blank line detected. Raw Output: lib/jay_api/elasticsearch/async.rb:53:1: C: Layout/EmptyLines: Extra blank line detected.

Check warning on line 54 in lib/jay_api/elasticsearch/async.rb

View workflow job for this annotation

GitHub Actions / lint

[rubocop] reported by reviewdog 🐶 Extra blank line detected. Raw Output: lib/jay_api/elasticsearch/async.rb:54:1: C: Layout/EmptyLines: Extra blank line detected.

Check warning on line 55 in lib/jay_api/elasticsearch/async.rb

View workflow job for this annotation

GitHub Actions / lint

[rubocop] reported by reviewdog 🐶 Extra blank line detected. Raw Output: lib/jay_api/elasticsearch/async.rb:55:1: C: Layout/EmptyLines: Extra blank line detected.

Check warning on line 56 in lib/jay_api/elasticsearch/async.rb

View workflow job for this annotation

GitHub Actions / lint

[rubocop] reported by reviewdog 🐶 Extra blank line detected. Raw Output: lib/jay_api/elasticsearch/async.rb:56:1: C: Layout/EmptyLines: Extra blank line detected.

Check warning on line 57 in lib/jay_api/elasticsearch/async.rb

View workflow job for this annotation

GitHub Actions / lint

[rubocop] reported by reviewdog 🐶 Extra blank line detected. Raw Output: lib/jay_api/elasticsearch/async.rb:57:1: C: Layout/EmptyLines: Extra blank line detected.

Check warning on line 58 in lib/jay_api/elasticsearch/async.rb

View workflow job for this annotation

GitHub Actions / lint

[rubocop] reported by reviewdog 🐶 Extra blank line detected. Raw Output: lib/jay_api/elasticsearch/async.rb:58:1: C: Layout/EmptyLines: Extra blank line detected.

Check warning on line 59 in lib/jay_api/elasticsearch/async.rb

View workflow job for this annotation

GitHub Actions / lint

[rubocop] reported by reviewdog 🐶 Extra blank line detected. Raw Output: lib/jay_api/elasticsearch/async.rb:59:1: C: Layout/EmptyLines: Extra blank line detected.
# @param [Hash] result The operation result to be validated
# @raise [Errors::QueryExecutionError] If executing the query results in
# errors
# @raise [Errors::QueryExecutionFailure] If executing the query results in
# failures
def validate_result(result)
raise Errors::QueryExecutionError, "Errors on index '#{index_name}':\n #{result[:error]}" if result[:error]

failures = result&.dig(:response, :failures)
return if failures.nil? || failures.empty?

Expand Down
Loading