Bug fixes to get the database connection working

pull/58/head
Christopher Usher 6 years ago
parent 4b9fbcb7d2
commit 9b28765ff2

@ -1,7 +1,7 @@
FROM alpine:3.7 FROM alpine:3.7
# dependencies needed for compiling c extensions # dependencies needed for compiling c extensions
# also busybox-extras for telnet for easier use of backdoor # also busybox-extras for telnet for easier use of backdoor
RUN apk --update add py2-pip gcc python-dev musl-dev busybox-extras RUN apk --update add py2-pip gcc python-dev musl-dev busybox-extras postgresql-dev postgresql-libs
# Install common lib first as it changes less # Install common lib first as it changes less
COPY common /tmp/common COPY common /tmp/common

@ -254,7 +254,7 @@ class BackfillerManager(object):
if self.node_database is not None: if self.node_database is not None:
self.logger.info('Fetching list of nodes from {}'.format( self.logger.info('Fetching list of nodes from {}'.format(
urlparse.urlparse(self.node_database).hostname)) urlparse.urlparse(self.node_database).hostname))
conn = self.db_manager.query() conn = self.db_manager.get_conn()
results = database.query(conn, """ results = database.query(conn, """
SELECT name, url, backfill_from SELECT name, url, backfill_from
FROM nodes""") FROM nodes""")

@ -7,6 +7,8 @@ setup(
install_requires = [ install_requires = [
"argh", "argh",
"gevent", "gevent",
"psycogreen",
"psycopg2",
"python-dateutil", "python-dateutil",
"requests", "requests",
"wubloader-common", "wubloader-common",

@ -10,7 +10,6 @@ setup(
"gevent", "gevent",
"psycogreen", "psycogreen",
"psycopg2", "psycopg2",
"python-dateutil",
"wubloader-common", "wubloader-common",
], ],
) )

Loading…
Cancel
Save