Skip to content

867 refactor link checker exclusion#871

Merged
jsjiang merged 2 commits intodevelopfrom
867_refactor_link_checker_exclusion
May 7, 2025
Merged

867 refactor link checker exclusion#871
jsjiang merged 2 commits intodevelopfrom
867_refactor_link_checker_exclusion

Conversation

@jsjiang
Copy link
Copy Markdown
Contributor

@jsjiang jsjiang commented May 6, 2025

@sfisher Hi Scott,
Refactoring the link checker script includes:

  • changed the way to provide exclusion file
    • current code uses command line option. Enable/Disable the exclusion file requires a modification to the systemd command we use to start the service at reboot.
    • new code gets the configurations from the settings file so we do not have to touch the systemd command
  • added prefix self. to the internal variables

Although the link checker job itself is not tested, handling of the exclusion file was tested by running a paired test script on ezidui-dev. Here are the tested items:

  • the exclude list has been loaded
  • the permanent and temporary exclusions are properly identified
  • user IDs in the exclusion list are excluded from the workset

Test results on handling of the exclusion file are documented in ticket #867 (comment)

The exclusion file link_check_exclusion_list.txt is defined in the /ezid/var/data folder in this format:

username1 temporary
username2 permanent

Please review and let me know if you have any questions.

Thank you

Jing

jsjiang and others added 2 commits April 30, 2025 15:37
Merge Develop to main branch
Provide exlusion file from setting variables instead of command args
Fix bugs on usage of internal values
@jsjiang jsjiang requested review from Copilot and sfisher May 6, 2025 22:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the link checker script to source its exclusion file configuration from the Django settings rather than the command line, and it updates internal variable references by prefixing them with self.

  • Replace CLI argument handling for the exclusion file with configuration via Django settings
  • Add self. prefixes to internal variables for consistency
Files not reviewed (1)
  • settings/settings.py.j2: Language not supported

Copy link
Copy Markdown
Contributor

@sfisher sfisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and seems like a fairly straightforward change to use a known file location instead of having to pass it to the args.

Thank you!

@jsjiang jsjiang merged commit 41093e3 into develop May 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants