@@ -197,8 +197,8 @@ def load_batch(self, batch: pa.RecordBatch, table_name: str, **kwargs) -> LoadRe
197197 )
198198 self .logger .error (error_msg )
199199 self .logger .error (
200- f 'Client will stop. On restart, streaming will resume from last checkpoint. '
201- f 'Fix the data/configuration issue before restarting.'
200+ 'Client will stop. On restart, streaming will resume from last checkpoint. '
201+ 'Fix the data/configuration issue before restarting.'
202202 )
203203 # Raise exception to stop the stream
204204 raise RuntimeError (error_msg )
@@ -220,8 +220,8 @@ def load_batch(self, batch: pa.RecordBatch, table_name: str, **kwargs) -> LoadRe
220220 )
221221 self .logger .error (error_msg )
222222 self .logger .error (
223- f 'Client will stop. On restart, streaming will resume from last checkpoint. '
224- f 'Fix the underlying issue before restarting.'
223+ 'Client will stop. On restart, streaming will resume from last checkpoint. '
224+ 'Fix the underlying issue before restarting.'
225225 )
226226 # Raise exception to stop the stream
227227 raise RuntimeError (error_msg )
@@ -547,8 +547,7 @@ def _process_reorg_event(
547547 # Log reorg details
548548 for range_obj in response .invalidation_ranges :
549549 self .logger .warning (
550- f'Reorg detected on { range_obj .network } : '
551- f'blocks { range_obj .start } -{ range_obj .end } invalidated'
550+ f'Reorg detected on { range_obj .network } : blocks { range_obj .start } -{ range_obj .end } invalidated'
552551 )
553552
554553 # Save reorg checkpoint (keeps old checkpoints for history)
@@ -674,9 +673,7 @@ def _process_batch_non_transactional(
674673
675674 if is_duplicate :
676675 # Skip this batch - already processed
677- self .logger .info (
678- f'Skipping duplicate batch: { len (ranges )} ranges already processed for { table_name } '
679- )
676+ self .logger .info (f'Skipping duplicate batch: { len (ranges )} ranges already processed for { table_name } ' )
680677 return LoadResult (
681678 rows_loaded = 0 ,
682679 duration = 0.0 ,
@@ -693,9 +690,7 @@ def _process_batch_non_transactional(
693690 if result .success and ranges :
694691 # Mark batch as processed (for exactly-once semantics)
695692 try :
696- self .processed_ranges_store .mark_processed (
697- connection_name , table_name , ranges , batch_hash
698- )
693+ self .processed_ranges_store .mark_processed (connection_name , table_name , ranges , batch_hash )
699694 except Exception as e :
700695 self .logger .error (f'Failed to mark ranges as processed: { e } ' )
701696 # Continue anyway - checkpoint will provide resume capability
@@ -733,10 +728,7 @@ def _save_checkpoint_if_complete(
733728
734729 try :
735730 self .checkpoint_store .save (connection_name , table_name , checkpoint )
736- self .logger .info (
737- f'Saved checkpoint at batch { batch_count } '
738- f'({ len (checkpoint .ranges )} ranges)'
739- )
731+ self .logger .info (f'Saved checkpoint at batch { batch_count } ({ len (checkpoint .ranges )} ranges)' )
740732 except Exception as e :
741733 # Log but don't fail the stream
742734 self .logger .error (f'Failed to save checkpoint: { e } ' )
@@ -760,9 +752,7 @@ def _augment_streaming_result(
760752 result .metadata ['batch_count' ] = batch_count
761753 result .metadata ['ranges_complete' ] = ranges_complete
762754 if ranges :
763- result .metadata ['block_ranges' ] = [
764- {'network' : r .network , 'start' : r .start , 'end' : r .end } for r in ranges
765- ]
755+ result .metadata ['block_ranges' ] = [{'network' : r .network , 'start' : r .start , 'end' : r .end } for r in ranges ]
766756 return result
767757
768758 def _compute_reorg_resume_point (self , invalidation_ranges : List [BlockRange ]) -> List [BlockRange ]:
0 commit comments