#NEWLINE# def _maybe_queue_file( self , file_path , enqueue = True ) : #NEWLINE# #INDENT# with file_util . FileReferenceContext ( ks_manifest ) as file_ref : #NEWLINE# #INDENT# if ( file_ref is None ) : #NEWLINE# #INDENT# self . log . info ( 'Ignoring deleted path %s' , file_path ) #NEWLINE# return False #NEWLINE# #UNINDENT# if cassandra . is_snapshot_path ( file_ref . stable_path ) : #NEWLINE# #INDENT# self . log . info ( 'Ignoring snapshot path %s' , file_ref . stable_path ) #NEWLINE# return False #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# component = cassandra . SSTableComponent ( file_ref . stable_path ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# self . log . info ( 'Ignoring non Cassandra file %s' , file_ref . stable_path ) #NEWLINE# return False #NEWLINE# #UNINDENT# if component . temporary : #NEWLINE# #INDENT# self . log . info ( 'Ignoring temporary file %s' , file_ref . stable_path ) #NEWLINE# return False #NEWLINE# #UNINDENT# if ( component . keyspace in self . exclude_keyspaces ) : #NEWLINE# #INDENT# self . log . info ( 'Ignoring file %s from excluded keyspace %s' , file_ref . stable_path , component . keyspace ) #NEWLINE# return False #NEWLINE# #UNINDENT# if ( ( component . keyspace . lower ( ) == 'system' ) and ( not self . include_system_keyspace ) ) : #NEWLINE# #INDENT# self . log . info ( 'Ignoring system keyspace file %s' , file_ref . stable_path ) #NEWLINE# return False #NEWLINE# #UNINDENT# ks_manifest = self . _get_ks_manifest ( component . keyspace ) #NEWLINE# ks_manifest . add_component ( component ) #NEWLINE# if enqueue : #NEWLINE# #INDENT# self . log . info ( 'Queueing file %s' , file_ref . stable_path ) #NEWLINE# self . file_queue . put ( BackupMessage ( file_ref , ks_manifest . snapshot ( ) , component ) ) #NEWLINE# file_ref . ignore_next_exit = True #NEWLINE# #UNINDENT# #UNINDENT# return True