Fix sitemap output with multiple threads

SitemapXmlLogger assumes the first result logged is for the root of the
website being mapped. Ensure results are logged before content is
checked.
This commit is contained in:
Chris Mayo 2022-09-30 19:22:17 +01:00
parent b3967f75c4
commit e6763f8516

View file

@ -57,6 +57,7 @@ def check_url(url_data, logger):
for alias in url_data.aliases:
# redirect aliases
cache.add_result(alias, result)
logger.log_url(result)
# parse content recursively
# XXX this could add new warnings which should be cached.
if do_parse:
@ -74,7 +75,7 @@ def check_url(url_data, logger):
result.column = url_data.column
result.level = url_data.recursion_level
result.name = url_data.name
logger.log_url(result)
logger.log_url(result)
class Checker(task.LoggedCheckedTask):