This commit is contained in:
mwiegand 2022-04-10 22:31:20 +02:00
parent cb12de50d8
commit 7ff7e0ed4a

View file

@ -92,22 +92,20 @@ import re
from urllib.parse import urlparse
import requests
from hashlib import sha3_256
import pb8000
import pg8000
pdt = pytz.timezone("Us/Pacific")
db = pg8000.connect(
host=credentials[app]['host'],
port=credentials[app]['port'],
database=credentials[app]['database'],
user=credentials[app]['user'],
password=credentials[app]['password'],
database=environ['DB_NAME'],
user=environ['DB_USER'],
password=environ['DB_PASSWORD'],
)
def query(app, query, **params):
cursor = db(app).cursor()
def query(query, **params):
cursor = db.cursor()
cursor.paramstyle = "named"
cursor.execute(query, params)
db(app).commit()
db.commit()
return cursor
def parse_trs(trs):