Skip to content
Snippets Groups Projects
Verified Commit e119de0d authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Exclude blocked domains from crawling

parent 7231af47
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,7 @@ def dict_cursor(func): ...@@ -73,7 +73,7 @@ def dict_cursor(func):
@dict_cursor @dict_cursor
async def get_latest_check_by_domain(cursor): async def get_latest_check_by_domain(cursor):
sql = """ sql = """
SELECT DISTINCT on (domain) domain, * FROM checks INNER JOIN domains ON checks.domain = domains.name WHERE private = %s ORDER BY domain, time DESC SELECT DISTINCT on (domain) domain, * FROM checks INNER JOIN domains ON checks.domain = domains.name WHERE private = %s AND domains.blocked = false ORDER BY domain, time DESC
""" """
await cursor.execute(sql, [False]) await cursor.execute(sql, [False])
return list(await cursor.fetchall()) return list(await cursor.fetchall())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment