gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-deployment] 02/02: check if merchant runs


From: gnunet
Subject: [taler-deployment] 02/02: check if merchant runs
Date: Sat, 18 Sep 2021 11:57:33 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository deployment.

commit 2c9efdf3eb09a6531759bcbc98506a5b7176b98b
Author: ms <ms@taler.net>
AuthorDate: Sat Sep 18 11:57:26 2021 +0200

    check if merchant runs
---
 bin/taler-deployment-config-instances-iban | 14 ++++----------
 1 file 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()

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]