wip
This commit is contained in:
parent
cb12de50d8
commit
7ff7e0ed4a
1 changed files with 7 additions and 9 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue