[Top][All Lists]

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

[taler-taler-merchant-demos] branch master updated: serving details from

From: gnunet
Subject: [taler-taler-merchant-demos] branch master updated: serving details from config
Date: Fri, 11 Sep 2020 18:42:19 +0200

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

ms pushed a commit to branch master
in repository taler-merchant-demos.

The following commit(s) were added to refs/heads/master by this push:
     new f4e26ba  serving details from config
f4e26ba is described below

commit f4e26ba99f7b9cc6d2e15f53351c5c8bc8c0630e
Author: MS <>
AuthorDate: Fri Sep 11 18:42:05 2020 +0200

    serving details from config
 bin/taler-merchant-demos | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/bin/taler-merchant-demos b/bin/taler-merchant-demos
index 7ed69d7..0100748 100755
--- a/bin/taler-merchant-demos
+++ b/bin/taler-merchant-demos
@@ -90,22 +90,26 @@ def handle_serve_http(config, whichShop, port=None):
         sys.stderr.write("Failed to start uwsgi. Please make sure to install 
uwsgi for Python3.")
+def handle_serve_from_config(config_obj, which_shop):
+    if config_obj.get("serve", "") == "http":
+        http_port = config_obj.value_int(which_shop, "port")        
+        return handle_serve_http(config_obj, which_shop, http_port)
+    handle_serve_uwsgi(config_obj, which_shop)
 @click.command("Global shop launcher")
 @click.option("--config", help="Configuration file", required=False)
-@click.option("--serve-http", help="Serve via HTTP", is_flag=True, 
-@click.option("--port", help="HTTP port to serve (if not given, it's picked 
from config)", required=False, type=int)
-@click.option("--serve-uwsgi", help="Serve via UWSGI (default)", 
+@click.option("--http-port", help="HTTP port to serve (if not given, serving 
comes from config)", required=False, type=int)
-def demos(config, serve_http, port, serve_uwsgi, which_shop):
+def demos(config, http_port, which_shop):
     WHICH_SHOP is one of: blog, donations, or survey.
     if config:
         os.environ["TALER_CONFIG_FILE"] = config
     config_obj = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE"))
-    if serve_http: # port was given
-        handle_serve_http(config_obj, which_shop, port)
+    if http_port:
+        handle_serve_http(config_obj, which_shop, http_port)
+        handle_serve_from_config(config_obj, which_shop)
         handle_serve_uwsgi(config_obj, which_shop)

To stop receiving notification emails like this one, please contact

reply via email to

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