From 18232f1d7d1996066d8d4c0a249ff116b9c01026 Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Mon, 10 Oct 2022 21:09:14 +0100 Subject: [PATCH 1/2] Fix #39 remove old config --- config.py.example | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/config.py.example b/config.py.example index 77509e5..c9fbb0f 100644 --- a/config.py.example +++ b/config.py.example @@ -1,13 +1,6 @@ # Builder module config +# Put this config in subscribie's .env file BUILDER_DEPLOY_WEB_HOST="192.168.1.1" BUILDER_SUB_AUTH_ID="123" BUILDER_SUB_AUTH_PASSWORD="secret" JAMLA_DEPLOY_URL="http://127.0.0.1:5001/" -#DISABLE_LEGACY_BUILD_METHOD=True # Disables legacy apache deploy method -COUCHDB_ENABLED=True -COUCHDB_SCHEME="http://" -COUCHDB_IP="127.0.0.1" -COUCHDB_USER="admin" -COUCHDB_PASS="password" -COUCHDB_PORT=5984 -COUCHDB_DBNAME="databasename" From b02af5c350889b48e4205dd8a56cff8825b780f3 Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Mon, 10 Oct 2022 21:50:10 +0100 Subject: [PATCH 2/2] Fix #41 improve logging deployer --- __init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index f32e37d..787fa06 100644 --- a/__init__.py +++ b/__init__.py @@ -21,6 +21,9 @@ import uuid import sqlite3 from subscribie.database import database +import logging + +log = logging.getLogger(__name__) builder = Blueprint("builder", __name__, template_folder="templates") @@ -201,7 +204,10 @@ def journey_complete_subscriber(sender, **kw): def deployJamla(filename, deploy_url=None): with open(filename) as fp: payload = json.loads(fp.read()) - requests.post(deploy_url, json=payload) + log.debug(f"Deploying new shop: {deploy_url}") + req = requests.post(deploy_url, json=payload) + log.debug(f"status_code from {deploy_url} was {req.status_code}") + req.raise_for_status() return "Sent jamla file for deployment"