OpenTechFund / bypass-otf_proxy

1 stars 1 forks source link

Report for problematic mirrors #8

Closed maxpearl closed 3 years ago

maxpearl commented 4 years ago

Set up a function to send a report of all problematic mirrors in a given time period (in the last week?). Here's the necessary SQL:

select domain, mirror_url, date_reported, user_agent, mirror_status from domains, mirrors, reports where domains.id=reports.domain_id and mirrors.id=reports.mirror_id and mirror_status!=200 and date_reported < localtimestamp + interval '7 days'

Same for onions:

select domain, onion, date_reported, user_agent, onion_status from domains, onions, onion_reports where domains.id=onion_reports.domain_id and onions.id=onion_reports.onion_id and onion_status!=200 and date_reported < localtimestamp + interval '7 days'