aboutsummaryrefslogtreecommitdiffstats
path: root/python/sandcrawler/db.py
Commit message (Collapse)AuthorAgeFilesLines
* grobid persist: if status_code is not set, default to 0bnewbold-persist-grobid-errorsBryan Newbold2020-01-281-1/+2
| | | | | | | | | | | | | | | We have to set something currently because of a NOT NULL constraint on the table. Originally I thought we would just not record rows if there was an error, and that is still sort of a valid stance. However, when doing bulk GROBID-ing from cdx table, there exist some "bad" CDX rows which cause wayback or petabox errors. We should fix bugs or delete these rows as a cleanup, but until that happens we should record the error state so we don't loop forever. One danger of this commit is that we can clobber existing good rows with new errors rapidly if there is wayback downtime or something like that.
* persist grobid: actually, status_code is requiredBryan Newbold2020-01-211-1/+1
| | | | | | | Instead of working around when missing, force it to exist but skip in database insert section. Disk mode still needs to check if blank.
* persist: work around GROBID timeouts with no status_codeBryan Newbold2020-01-211-1/+1
|
* persist: fix dupe field copyingBryan Newbold2020-01-151-1/+8
| | | | | | In testing hit: AttributeError: 'str' object has no attribute 'get'
* persist worker: implement updated ingest result semanticsBryan Newbold2020-01-151-1/+1
|
* small fixups to SandcrawlerPostgrestClientBryan Newbold2020-01-141-1/+10
|
* db: move duplicate row filtering into DB insert helpersBryan Newbold2020-01-021-0/+25
|
* fix DB import countingBryan Newbold2020-01-021-4/+5
|
* fix small errors found by pylintBryan Newbold2020-01-021-1/+1
|
* db: fancy insert/update separation using postgres xmaxBryan Newbold2020-01-021-15/+30
|
* improve DB helpersBryan Newbold2020-01-021-26/+81
| | | | | - return insert/update row counts - implement ON CONFLICT ... DO UPDATE on some tables
* start work on DB connector and minio clientBryan Newbold2020-01-021-0/+141