@gen.engine
def GetRawLogsFileList(logs_store, logs_paths, marker, callback):
 def _WantFile(filename):
  instance = logs_paths.RawLogPathToInstance(filename)
  if (instance is None):
   logging.error(('Could not extract instance from file name %s' % filename))
   return False
  return ((not options.options.ec2_only) or logs_util.IsEC2Instance(instance))
 base_path = logs_paths.RawDirectory()
 marker = (os.path.join(base_path, marker) if (marker is not None) else None)
 file_list = (yield gen.Task(store_utils.ListAllKeys, logs_store, prefix=base_path, marker=marker))
 files = [f for f in file_list if _WantFile(f)]
 logging.info(('found %d total raw log files, %d important ones' % (len(file_list), len(files))))
 callback(files)

@ gen . engine def GetRawLogsFileList ( logs_store , logs_paths , marker , callback ) : def _WantFile ( filename ) : instance = logs_paths . RawLogPathToInstance ( filename ) if ( instance is None ) : logging . error ( ( 'Could not extract instance from file name %s' % filename ) ) return False return ( ( not options . options . ec2_only ) or logs_util . IsEC2Instance ( instance ) ) base_path = logs_paths . RawDirectory ( ) marker = ( os . path . join ( base_path , marker ) if ( marker is not None ) else None ) file_list = ( yield gen . Task ( store_utils . ListAllKeys , logs_store , prefix = base_path , marker = marker ) ) files = [ f for f in file_list if _WantFile ( f ) ] logging . info ( ( 'found %d total raw log files, %d important ones' % ( len ( file_list ) , len ( files ) ) ) ) callback ( files )
fetch the list of file names from s3 .