Exception: Parse::Embeddings::BatchEmbedder::BatchFailed
- Defined in:
- lib/parse/embeddings/batch_embedder.rb
Overview
Raised when a batch still fails after max_attempts retryable
failures. Wraps the final provider error in #cause and carries
the index of the failing batch so a resumable job knows where to
pick up.
Instance Attribute Summary collapse
-
#batch_index ⇒ Integer
readonly
Zero-based index of the failing batch.
-
#completed_count ⇒ Integer
readonly
Number of inputs successfully embedded before the failure.
Instance Method Summary collapse
-
#initialize(message, batch_index:, completed_count:) ⇒ BatchFailed
constructor
A new instance of BatchFailed.
Constructor Details
#initialize(message, batch_index:, completed_count:) ⇒ BatchFailed
Returns a new instance of BatchFailed.
54 55 56 57 58 |
# File 'lib/parse/embeddings/batch_embedder.rb', line 54 def initialize(, batch_index:, completed_count:) @batch_index = batch_index @completed_count = completed_count super() end |
Instance Attribute Details
#batch_index ⇒ Integer (readonly)
Returns zero-based index of the failing batch.
50 51 52 |
# File 'lib/parse/embeddings/batch_embedder.rb', line 50 def batch_index @batch_index end |
#completed_count ⇒ Integer (readonly)
Returns number of inputs successfully embedded before the failure.
52 53 54 |
# File 'lib/parse/embeddings/batch_embedder.rb', line 52 def completed_count @completed_count end |