-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ #993 ADD celery task 1: every day check that extracts ever… #1018
Conversation
…m each localized product and checks if the URL is valid - task 2: every month send monthly report bout the links
product_dict = defaultdict(lambda: defaultdict(list)) | ||
url_set = set() | ||
url_response_status_codes = defaultdict(int) | ||
founded_broken_link_ids = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use class-level attributes (that are initialized).
If you find this is needed because multiple functions are writing or reading the same class-variable, then the functions are incorrect or you need to pass the data around as argument to the next function.
For example, your function get_products_to_check
doesn't "get" products. It fills a variable with products. Just, make this function return the products instead of filling a class-level variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to fix this in adc0602 ✅
Fixes #993