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()
def on_shutdown(msg): print "Shutdown >>>", msg.body vertx.exit()