summaryrefslogtreecommitdiff
path: root/taler-merchant-backoffice.in
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-06-07 21:04:57 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-06-07 21:04:57 +0200
commit034e518f06163072ee69dcab8a6f0b776cdd161a (patch)
tree6cfb6d1ad9a7121174a26a47cc53903faf5c8336 /taler-merchant-backoffice.in
parentea4d0bd2cb6c2b61c2baa940e9dc5bc9c02ef9f5 (diff)
downloadbackoffice-034e518f06163072ee69dcab8a6f0b776cdd161a.tar.gz
backoffice-034e518f06163072ee69dcab8a6f0b776cdd161a.tar.bz2
backoffice-034e518f06163072ee69dcab8a6f0b776cdd161a.zip
Aggregate commit.
Fix the way alternative config files are read from command line, and add a big "switch" where error codes from HTTP services are read and rendered as nice-ish messages.
Diffstat (limited to 'taler-merchant-backoffice.in')
-rw-r--r--taler-merchant-backoffice.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/taler-merchant-backoffice.in b/taler-merchant-backoffice.in
index 0ea5097..eed11f3 100644
--- a/taler-merchant-backoffice.in
+++ b/taler-merchant-backoffice.in
@@ -19,12 +19,12 @@ site.addsitedir("%s/lib/python%d.%d/site-packages" % (
sys.version_info.minor))
LOGGER = logging.getLogger(__name__)
-TC = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE"))
# No perfect match to our logging format, but good enough ...
UWSGI_LOGFMT = "%(ltime) %(proto) %(method) %(uri) %(proto) => %(status)"
def handle_serve_http(args):
+ TC = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE"))
port = args.port
if port is None:
port = TC["backoffice-%s" % args.frontend]["http_port"].value_int(required=True)
@@ -39,6 +39,7 @@ def handle_serve_http(args):
"--env", "BACKOFFICE_INSTANCES=%s" % TC["backoffice-%s" % args.frontend]["instances"].value_string(required=True))
def handle_serve_uwsgi(args):
+ TC = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE"))
serve_uwsgi = TC["backoffice-%s" % args.frontend]["uwsgi_serve"].value_string(required=True).lower()
params = ["uwsgi", "uwsgi",
"--master",