From f7d78c2257f83f038cd46c51027506491957fc05 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 27 Feb 2021 00:22:02 +1100 Subject: [PATCH 1/4] also need flask --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 1c0fcf9..623e3f0 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ In here we can put instructions on how to run this / any general info ubuntu packages: - sudo apt-get install -y mediainfo cmake + sudo apt-get install -y mediainfo cmake python3-flask pip packages: * pymediainfo From a82226b0823d2fd7aa02d458b8f2f69463b38e27 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 27 Feb 2021 10:57:27 +1100 Subject: [PATCH 2/4] use DB_URL from shared --- main.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main.py b/main.py index a7d2d6d..d6f010f 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,7 @@ from flask_bootstrap import Bootstrap from wtforms import SubmitField, StringField, HiddenField, SelectField, IntegerField, TextAreaField, validators from flask_wtf import FlaskForm from status import st, Status -from shared import CreateSelect +from shared import CreateSelect, DB_URL import re import socket @@ -17,9 +17,6 @@ print( "Running on: {}".format( hostname) ) app = Flask(__name__) ### what is this value? I gather I should change it? -# connection string: pguseraccount, pgpasswd, mara as the host, db port is 55432, dbname -DB_URL = 'postgresql+psycopg2://pa:for_now_pa@mara.ddp.net:55432/pa' - app.config['SQLALCHEMY_DATABASE_URI'] = DB_URL app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config.from_mapping( SECRET_KEY=b'\xd6\x04\xbdj\xfe\xed$c\x1e@\xad\x0f\x13,@G') From 4042fdef772183ae4b9e5f81d9aa88e11089de5e Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 27 Feb 2021 10:57:57 +1100 Subject: [PATCH 3/4] put explicit use of locahost:5432 for pg, and localhost:5000 for flask for lappy --- shared.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared.py b/shared.py index aefe742..a20c477 100644 --- a/shared.py +++ b/shared.py @@ -1,13 +1,18 @@ import socket -DB_URL = 'postgresql+psycopg2://pa:for_now_pa@mara.ddp.net:55432/pa' hostname = socket.gethostname() PROD_HOST="pa_web" if hostname == PROD_HOST: PA_JOB_MANAGER_HOST="192.168.0.2" + DB_URL = 'postgresql+psycopg2://pa:for_now_pa@192.168.0.2:55432/pa' +elif hostname == "lappy": + PA_JOB_MANAGER_HOST="localhost" + DB_URL = 'postgresql+psycopg2://pa:for_now_pa@localhost:5432/pa' else: PA_JOB_MANAGER_HOST="localhost" + DB_URL = 'postgresql+psycopg2://pa:for_now_pa@mara.ddp.net:55432/pa' + PA_JOB_MANAGER_PORT=55430 THUMBSIZE=256 From 98207dfd9cd82d7bb29d2c500a5e4f4205c48fa8 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 27 Feb 2021 10:58:45 +1100 Subject: [PATCH 4/4] added TODO for includes when not on internet --- TODO | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TODO b/TODO index 5863299..55a87e0 100644 --- a/TODO +++ b/TODO @@ -37,6 +37,8 @@ -> delete old jobs / auto delete jobs older than ??? ### UI + need to copy into here the jquery/fa files so we don't need internet to function + sorter... need some way to multiselect images [DONE] and then get them into a new "folder"