Allow changedetector to ignore status codes as a per-site setting (#479) (#485)

Co-authored-by: Ara Hayrabedian <ara.hayrabedian@gmail.com>
This commit is contained in:
dgtlmoon
2022-03-21 23:03:54 +01:00
committed by GitHub
parent 5483f5d694
commit 942c3f021f
8 changed files with 233 additions and 19 deletions

View File

@@ -53,6 +53,7 @@ class perform_site_check():
url = self.datastore.get_val(uuid, 'url')
request_body = self.datastore.get_val(uuid, 'body')
request_method = self.datastore.get_val(uuid, 'method')
ignore_status_code = self.datastore.get_val(uuid, 'ignore_status_codes')
# Pluggable content fetcher
prefer_backend = watch['fetch_backend']
@@ -64,7 +65,7 @@ class perform_site_check():
fetcher = klass()
fetcher.run(url, timeout, request_headers, request_body, request_method)
fetcher.run(url, timeout, request_headers, request_body, request_method, ignore_status_code)
# Fetching complete, now filters
# @todo move to class / maybe inside of fetcher abstract base?