예제 #1
0
def init_credmgr(config):
    mgr = CredentialManager([])    
    for cfg in config.get("credentials") or []:
        mgr.add(cfg)
    key = config.get("credentialsEnvVar")
    if not key:
        return
    try:
        mgr.from_env(key)
    except KeyError, e:
        if mgr.size() == 0:
            logger.error("*" * 80)
            logger.error("No credentials found in the config, and credentials could not be loaded from env")
            logger.error("*" * 80)
            vertx.exit()
예제 #2
0
 def on_shutdown(msg):
     print "Shutdown >>>", msg.body
     vertx.exit()