@gen.coroutine
def _Init(init_db=True, server_logging=True):
 httpclient.AsyncHTTPClient.configure('tornado.curl_httpclient.CurlAsyncHTTPClient', max_clients=100)
 if options.options.devbox:
  metadata = ami_metadata.Metadata()
 else:
  metadata = (yield gen.Task(ami_metadata.Metadata))
 if (metadata is None):
  raise Exception('failed to fetch AWS instance metadata; if running on dev box, use the --devbox option')
 ami_metadata.SetAMIMetadata(metadata)
 logging.info('AMI metadata initialized')
 ServerEnvironment.InitServerEnvironment()
 logging.info('server environment initialized')
 (yield gen.Task(secrets.InitSecrets, can_prompt=sys.stderr.isatty()))
 logging.info('secrets initialized')
 if init_db:
  (yield gen.Task(db_client.InitDB, vf_schema.SCHEMA))
  logging.info('DB client initialized')
 object_store.InitObjectStore(temporary=False)
 logging.info('object store initialized')
 if server_logging:
  server_log.InitServerLog()
 logging.info('main.py initialization complete')

@ gen . coroutine def _Init ( init_db = True , server_logging = True ) : httpclient . AsyncHTTPClient . configure ( 'tornado.curl_httpclient.CurlAsyncHTTPClient' , max_clients = 100 ) if options . options . devbox : metadata = ami_metadata . Metadata ( ) else : metadata = ( yield gen . Task ( ami_metadata . Metadata ) ) if ( metadata is None ) : raise Exception ( 'failed to fetch AWS instance metadata; if running on dev box, use the --devbox option' ) ami_metadata . SetAMIMetadata ( metadata ) logging . info ( 'AMI metadata initialized' ) ServerEnvironment . InitServerEnvironment ( ) logging . info ( 'server environment initialized' ) ( yield gen . Task ( secrets . InitSecrets , can_prompt = sys . stderr . isatty ( ) ) ) logging . info ( 'secrets initialized' ) if init_db : ( yield gen . Task ( db_client . InitDB , vf_schema . SCHEMA ) ) logging . info ( 'DB client initialized' ) object_store . InitObjectStore ( temporary = False ) logging . info ( 'object store initialized' ) if server_logging : server_log . InitServerLog ( ) logging . info ( 'main.py initialization complete' )
completes viewfinder initialization .