Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions apps/greencheck/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,12 @@ def retrieve(self, request, *args, **kwargs):

if not via_carbon_txt:
self.clear_from_caches(domain)

if http_response := self.build_response_from_full_network_lookup(domain):
else:
# Try the database green domain cache table first:
if http_response := self.build_response_from_database_lookup(domain):
return http_response

# Try the database green domain cache table first:
if http_response := self.build_response_from_database_lookup(domain):
return http_response

# not in cache table cache, try full lookup using network
# not in cache table cache (or skipped), try full lookup using network
if http_response := self.build_response_from_full_network_lookup(domain):
return http_response

Expand Down