parameters: (db)
docstring: Orion database to process
      :param db:
      :return:
docstring_summary: Orion database to process
      :param db:
      :return:
docstring_tokens: Orion database to process : param db : : return :
function: def process_db(db):
      """
      Orion database to process
      :param db:
      :return:
      """
  
      global total_subs
      global wrong_protocol
      global wrong_reference
  
      for sub in client[db].csubs.find():
          total_subs += 1
  
          if not 'reference' in sub:
              wrong_reference =+ 1
              return
  
          url = sub['reference']
  
          if not (url.startswith('http://') or url.startswith('https://')):
              wrong_protocol = + 1
              return
  
          # Endpoint: the string between "http(s):// and next /
          endpoint = url.split('//')[1].split('/')[0]
          add_endpoint(endpoint)
function_tokens: def process_db ( db ) : global total_subs global wrong_protocol global wrong_reference for sub in client [ db ] . csubs . find ( ) : total_subs += 1 if not 'reference' in sub : wrong_reference = + 1 return url = sub [ 'reference' ] if not ( url . startswith ( 'http://' ) or url . startswith ( 'https://' ) ) : wrong_protocol = + 1 return # Endpoint: the string between "http(s):// and next / endpoint = url . split ( '//' ) [ 1 ] . split ( '/' ) [ 0 ] add_endpoint ( endpoint )