blob: b0051dd89f4f762d16dd8d3b789271657a266bcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
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'
OR ingest_request.ingest_type = 'html')
AND ingest_file_result.hit = false
AND ingest_request.created < NOW() - '6 hour'::INTERVAL
AND ingest_request.created > NOW() - '180 day'::INTERVAL
AND ingest_request.ingest_request_source = 'savepapernow-web'
AND (
ingest_file_result.status like 'spn2-%'
-- 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'
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';
|