aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-03-05 01:09:40 -0800
committerBryan Newbold <bnewbold@archive.org>2020-03-05 01:09:40 -0800
commit5214a7397ee7f4f6e0624bc5ed2b8cb92b66c94f (patch)
treea271fbbea504305d538255e9d6635d80b1a810f4 /python
parent97ffdc17941b1272a8c7f05c0d1353cd28761280 (diff)
downloadsandcrawler-5214a7397ee7f4f6e0624bc5ed2b8cb92b66c94f.tar.gz
sandcrawler-5214a7397ee7f4f6e0624bc5ed2b8cb92b66c94f.zip
fixes to ingest-request persist
Diffstat (limited to 'python')
-rwxr-xr-xpython/persist_tool.py2
-rw-r--r--python/sandcrawler/persist.py4
2 files changed, 2 insertions, 4 deletions
diff --git a/python/persist_tool.py b/python/persist_tool.py
index f0beef8..19e6dd7 100755
--- a/python/persist_tool.py
+++ b/python/persist_tool.py
@@ -162,7 +162,7 @@ def main():
sub_ingest_request = subparsers.add_parser('ingest-request',
help="backfill a ingest_request JSON dump into postgresql")
- sub_ingest_request.set_defaults(func=run_ingest_file_result)
+ sub_ingest_request.set_defaults(func=run_ingest_request)
sub_ingest_request.add_argument('json_file',
help="ingest_request to import from (or '-' for stdin)",
type=argparse.FileType('r'))
diff --git a/python/sandcrawler/persist.py b/python/sandcrawler/persist.py
index 5960756..f5de44a 100644
--- a/python/sandcrawler/persist.py
+++ b/python/sandcrawler/persist.py
@@ -201,9 +201,7 @@ class PersistIngestFileResultWorker(SandcrawlerWorker):
class PersistIngestRequestWorker(PersistIngestFileResultWorker):
def __init__(self, db_url, **kwargs):
- super().__init__()
- self.db = SandcrawlerPostgresClient(db_url)
- self.cur = self.db.conn.cursor()
+ super().__init__(db_url=db_url)
def process(self, record):
"""