def start_snitch(app):
  cfg.update_from_metadata()
  state = sys.argv[1]

  # The coordinator will poll this
  @app.route('/status')
  def status():
    return json.dumps({'state': state}) + '\n'

  # Bottle's wrapper around cherrypy doesn't let us setup SSL, so do this
  # ourselves
  server = cherrypy.wsgiserver.CherryPyWSGIServer(('0.0.0.0', cfg.port), app)
  server.quiet = True
  server.ssl_certificate = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
  server.ssl_private_key = '/etc/ssl/private/ssl-cert-snakeoil.key'
  try:
    server.start()
  finally:
    server.stop()
Get the value affected to a tag.
dataset/ETHPy150Open GoogleCloudPlatform/compute-hadoop-java-python/hadoop/common_snitch.py/start_snitch--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/src/ircmsgs.py/IrcMsg.tagged