commit 3349d05464c2826ed6c333930a11e8e4bfeff46a
parent 151c7f1b00fa8c9bb181bbacb53168b077b5707c
Author: ms <ms@taler.net>
Date: Tue, 25 May 2021 23:24:49 +0200
helper function
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/bin/taler-deployment-config-instances b/bin/taler-deployment-config-instances
@@ -24,6 +24,11 @@ def expect_env(name):
exit(1)
return val
+def wait_merchant():
+ for proc in psutil.process_iter():
+ if proc.name() == "taler-merchant-httpd" and proc.username == getuser():
+ break
+ sleep(1)
MERCHANT_BACKEND_BASE_URL = expect_env("TALER_ENV_MERCHANT_BACKEND")
TALER_ENV_NAME = expect_env("TALER_ENV_NAME")
@@ -86,9 +91,12 @@ def ensure_default_instance():
still_running = True
sleep(1)
break
+
env_with_token = environ.copy()
env_with_token["TALER_MERCHANT_TOKEN"] = TALER_ENV_FRONTENDS_APITOKEN
merchant = Popen(["taler-merchant-httpd"], env=env_with_token)
+
+ wait_merchant()
ensure_instance(
"default",
"default",
@@ -100,6 +108,7 @@ def ensure_default_instance():
system("taler-deployment-arm -i taler-merchant")
ensure_default_instance()
+wait_merchant()
ensure_instance(
"blog",