diff options
Diffstat (limited to 'sql/dump_reingest_spn.sql')
-rw-r--r-- | sql/dump_reingest_spn.sql | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/dump_reingest_spn.sql b/sql/dump_reingest_spn.sql new file mode 100644 index 0000000..a8ed72f --- /dev/null +++ b/sql/dump_reingest_spn.sql @@ -0,0 +1,25 @@ + +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' + AND ingest_file_result.hit = false + AND ingest_request.created < NOW() - '2 hour'::INTERVAL + AND ingest_request.created > NOW() - '31 day'::INTERVAL + AND ingest_request.ingest_request_source = 'savepapernow-web' + 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' + ) + AND ingest_file_result.status != 'spn2-error:invalid-url-syntax' + AND ingest_file_result.status != 'spn2-error:filesize-limit' + AND ingest_file_result.status != 'spn2-error:not-found' + AND ingest_file_result.status != 'spn2-error:blocked-url' + AND ingest_file_result.status != 'spn2-error:too-many-redirects' + AND ingest_file_result.status != 'spn2-error:network-authentication-required' + AND ingest_file_result.status != 'spn2-error:unknown' +) TO '/srv/sandcrawler/tasks/reingest_spn.rows.json'; |