@gen.engine
def HandleOneUser(client_store, user_id, callback):
 logs_paths = logs_util.UserAnalyticsLogsPaths(user_id)
 base_path = logs_paths.RawDirectory()
 marker = (os.path.join(base_path, options.options.start_date) if (options.options.start_date is not None) else None)
 files = (yield gen.Task(store_utils.ListAllKeys, client_store, prefix=base_path, marker=marker))
 analytics_files = []
 crash_files = []
 for f in sorted(files):
  if f.endswith('.analytics.gz'):
   analytics_files.append(f)
  elif (f.endswith('.crash') or f.endswith('.crash.gz')):
   crash_files.append(f)
 if (analytics_files and options.options.process_analytics):
  (yield gen.Task(HandleAnalytics, client_store, user_id, logs_paths, analytics_files))
 if (crash_files and options.options.process_crashes):
  (yield gen.Task(HandleCrashes, client_store, user_id, crash_files))
 callback()

@ gen . engine def HandleOneUser ( client_store , user_id , callback ) : logs_paths = logs_util . UserAnalyticsLogsPaths ( user_id ) base_path = logs_paths . RawDirectory ( ) marker = ( os . path . join ( base_path , options . options . start_date ) if ( options . options . start_date is not None ) else None ) files = ( yield gen . Task ( store_utils . ListAllKeys , client_store , prefix = base_path , marker = marker ) ) analytics_files = [ ] crash_files = [ ] for f in sorted ( files ) : if f . endswith ( '.analytics.gz' ) : analytics_files . append ( f ) elif ( f . endswith ( '.crash' ) or f . endswith ( '.crash.gz' ) ) : crash_files . append ( f ) if ( analytics_files and options . options . process_analytics ) : ( yield gen . Task ( HandleAnalytics , client_store , user_id , logs_paths , analytics_files ) ) if ( crash_files and options . options . process_crashes ) : ( yield gen . Task ( HandleCrashes , client_store , user_id , crash_files ) ) callback ( )
process client logs for a single user .