aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
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):
"""