diff options
author | ms <ms@taler.net> | 2021-09-18 11:57:26 +0200 |
---|---|---|
committer | ms <ms@taler.net> | 2021-09-18 11:57:26 +0200 |
commit | 2c9efdf3eb09a6531759bcbc98506a5b7176b98b (patch) | |
tree | 698a978b72dfe0740e9bb15e16a4dc3e7a4c1966 | |
parent | cab586a68c3d2105124e3ec8c60a134f2e2bc0bd (diff) | |
download | deployment-2c9efdf3eb09a6531759bcbc98506a5b7176b98b.tar.gz deployment-2c9efdf3eb09a6531759bcbc98506a5b7176b98b.tar.bz2 deployment-2c9efdf3eb09a6531759bcbc98506a5b7176b98b.zip |
check if merchant runs
-rwxr-xr-x | bin/taler-deployment-config-instances-iban | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/bin/taler-deployment-config-instances-iban b/bin/taler-deployment-config-instances-iban index d17eec5..4f1abda 100755 --- a/bin/taler-deployment-config-instances-iban +++ b/bin/taler-deployment-config-instances-iban @@ -36,7 +36,6 @@ def wait_merchant_up(): url = urljoin(MERCHANT_BACKEND_BASE_URL, "/config") print("Check URL: {}".format(url)) while checks > 0: - try: resp = requests.get(url, timeout=5) except Exception: @@ -54,10 +53,8 @@ def wait_merchant_up(): print("Merchant is up and running") return True - if checks == 0: - print("Merchant is not correctly serving requests.") - return False - + print("Merchant is not correctly serving requests.") + return False MERCHANT_BACKEND_BASE_URL = expect_env("TALER_ENV_MERCHANT_BACKEND") TALER_ENV_NAME = expect_env("TALER_ENV_NAME") @@ -67,7 +64,6 @@ authorization_header = {"Authorization": f"Bearer {TALER_ENV_FRONTENDS_APITOKEN} def ensure_instance(instance_id, name, payto_uris, auth): - resp = requests.get( urljoin(MERCHANT_BACKEND_BASE_URL, f"management/instances/{instance_id}"), headers = authorization_header @@ -127,13 +123,11 @@ def ensure_default_instance(): if checks == 0: print("Could not stop the running merchant.") exit(1) - - print("Successfully terminating the merchant.") # ARM is _not_ running the merchant at this point. env_with_token = environ.copy() env_with_token["TALER_MERCHANT_TOKEN"] = TALER_ENV_FRONTENDS_APITOKEN - print("Starting the merchant outside ARM, passing the token into the environment.") + print("Starting the merchant outside ARM to pass the token into the environment.") # Start the merchant natively. merchant = Popen(["taler-merchant-httpd"], env=env_with_token) @@ -154,7 +148,7 @@ def ensure_default_instance(): merchant.wait() ensure_default_instance() - +print("Restarting merchant _with_ ARM, to create other non-default instances.") system("taler-deployment-arm -s") system("taler-deployment-arm -i taler-merchant") wait_merchant_up() |