aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dump_reingest_quarterly.sql
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2022-02-08 16:57:16 -0800
committerBryan Newbold <bnewbold@archive.org>2022-02-08 16:57:16 -0800
commitb76630806d43427ddcdef8cd6efd110c731668a5 (patch)
tree2b0d9c940ab6abc13ed36e4c4ecf0a4011ba5426 /sql/dump_reingest_quarterly.sql
parent963fc4a50e0eddc99c14c6ff571d099e8873abac (diff)
downloadsandcrawler-b76630806d43427ddcdef8cd6efd110c731668a5.tar.gz
sandcrawler-b76630806d43427ddcdef8cd6efd110c731668a5.zip
sql: script to reingest recent spn2 lookup failure in bulk mode
Diffstat (limited to 'sql/dump_reingest_quarterly.sql')
-rw-r--r--sql/dump_reingest_quarterly.sql15
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/dump_reingest_quarterly.sql b/sql/dump_reingest_quarterly.sql
index 725a404..c425a15 100644
--- a/sql/dump_reingest_quarterly.sql
+++ b/sql/dump_reingest_quarterly.sql
@@ -2,7 +2,9 @@
COPY (
SELECT row_to_json(ingest_request.*) FROM ingest_request
LEFT JOIN ingest_file_result ON ingest_file_result.base_url = ingest_request.base_url
- WHERE ingest_request.ingest_type = 'pdf'
+ WHERE
+ (ingest_request.ingest_type = 'pdf'
+ OR ingest_request.ingest_type = 'html')
AND ingest_file_result.hit = false
AND ingest_request.created < NOW() - '8 hour'::INTERVAL
AND ingest_request.created > NOW() - '91 day'::INTERVAL
@@ -10,11 +12,12 @@ COPY (
OR ingest_request.ingest_request_source = 'fatcat-ingest')
AND (
ingest_file_result.status like 'spn2-%'
- OR ingest_file_result.status like 'cdx-error'
- OR ingest_file_result.status like 'wayback-error'
- OR ingest_file_result.status like 'wayback-content-error'
- OR ingest_file_result.status like 'petabox-error'
- OR ingest_file_result.status like 'gateway-timeout'
+ OR ingest_file_result.status = 'cdx-error'
+ OR ingest_file_result.status = 'wayback-error'
+ OR ingest_file_result.status = 'wayback-content-error'
+ OR ingest_file_result.status = 'petabox-error'
+ OR ingest_file_result.status = 'gateway-timeout'
+ OR ingest_file_result.status = 'no-capture'
)
AND ingest_file_result.status != 'spn2-error:invalid-url-syntax'
AND ingest_file_result.status != 'spn2-error:filesize-limit'