Merge branch 'master' of 192.168.0.2:photoassistant

This commit is contained in:
2021-02-27 17:38:31 +11:00
4 changed files with 9 additions and 6 deletions

2
README
View File

@@ -2,7 +2,7 @@ In here we can put instructions on how to run this / any general info
ubuntu packages: ubuntu packages:
sudo apt-get install -y mediainfo cmake sudo apt-get install -y mediainfo cmake python3-flask
pip packages: pip packages:
* pymediainfo * pymediainfo

1
TODO
View File

@@ -42,6 +42,7 @@
clear all jobs (via GUI) clear all jobs (via GUI)
clear old jobs? (via b/end?) clear old jobs? (via b/end?)
clear FE messages (at least dup ones on File data deletion) -- in backend clear FE messages (at least dup ones on File data deletion) -- in backend
need to copy into here the jquery/fa files so we don't need internet to function
sorter... sorter...
need some way to multiselect images [DONE] need some way to multiselect images [DONE]

View File

@@ -6,7 +6,7 @@ from flask_bootstrap import Bootstrap
from wtforms import SubmitField, StringField, HiddenField, SelectField, IntegerField, TextAreaField, validators from wtforms import SubmitField, StringField, HiddenField, SelectField, IntegerField, TextAreaField, validators
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from status import st, Status from status import st, Status
from shared import CreateSelect from shared import CreateSelect, DB_URL
import re import re
import socket import socket
@@ -17,9 +17,6 @@ print( "Running on: {}".format( hostname) )
app = Flask(__name__) app = Flask(__name__)
### what is this value? I gather I should change it? ### 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_DATABASE_URI'] = DB_URL
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config.from_mapping( SECRET_KEY=b'\xd6\x04\xbdj\xfe\xed$c\x1e@\xad\x0f\x13,@G') app.config.from_mapping( SECRET_KEY=b'\xd6\x04\xbdj\xfe\xed$c\x1e@\xad\x0f\x13,@G')

View File

@@ -1,13 +1,18 @@
import socket import socket
DB_URL = 'postgresql+psycopg2://pa:for_now_pa@mara.ddp.net:55432/pa'
hostname = socket.gethostname() hostname = socket.gethostname()
PROD_HOST="pa_web" PROD_HOST="pa_web"
if hostname == PROD_HOST: if hostname == PROD_HOST:
PA_JOB_MANAGER_HOST="192.168.0.2" 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: else:
PA_JOB_MANAGER_HOST="localhost" PA_JOB_MANAGER_HOST="localhost"
DB_URL = 'postgresql+psycopg2://pa:for_now_pa@mara.ddp.net:55432/pa'
PA_JOB_MANAGER_PORT=55430 PA_JOB_MANAGER_PORT=55430
THUMBSIZE=256 THUMBSIZE=256