Closed svenseeberg closed 1 year ago
Thanks, now do you think you would be able to write a regression test for this?
Thanks, now do you think you would be able to write a regression test for this?
I think writing a test case for this is hard because of two reasons:
I tried to make a test, but wasn't able to push to your branch. Here it is if you want to pick it up: https://github.com/claudep/django-linkcheck/commit/dbb679880a3
@claudep Ahh thanks, somehow I was so focused on checking the do_check_instance_links()
function in the queue context that I didn't think about testing the standalone queue itself :sweat_smile:
This PR catches all errors that may arise while calling
do_check_instance_links()
from the worker thread. This should hopefully prevent the worker thread from crashing as it does not do anything else.If an error occurs, the representation of the instance and other parameters is being logged.
I have to admit that the solution is a little lazy, but I cannot think of a scenario were catching all errors would cause an issue.
This should fix #117