Skip to content
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

Use watchfiles as a file watching backend #3151

Merged
merged 7 commits into from
Oct 28, 2023
Merged

Use watchfiles as a file watching backend #3151

merged 7 commits into from
Oct 28, 2023

Conversation

RealOrangeOne
Copy link
Contributor

This doesn't use polling unless absolutely necessarily, making it more efficient. It also reduces the amount of first-party code required, and simplifies working out which files are being watched.

Pull Request Checklist

  • Ensured tests pass and (if applicable) updated functional test output
  • Conformed to code style guidelines by running appropriate linting tools
  • Added tests for changed code
  • Updated documentation for changed code

@avaris
Copy link
Member

avaris commented Jun 22, 2023

I'll review when I get the time but before that you also need to add it to the requirements list in setup.py.

@justinmayer justinmayer requested a review from a team July 27, 2023 20:21
Copy link
Member

@avaris avaris left a comment

Choose a reason for hiding this comment

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

Also, linter wants some changes.

pelican/utils.py Outdated Show resolved Hide resolved
@avaris avaris self-assigned this Oct 28, 2023
RealOrangeOne and others added 7 commits October 28, 2023 17:15
This doesn't use polling unless absolutely necessarily, making it more efficient. It also reduces the amount of first-party code required, and simplifies working out which files are being watched.
Copy link
Member

@avaris avaris left a comment

Choose a reason for hiding this comment

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

Had to make some changes.

  • For not-existing paths it was erroring out, so had to take them out of watch list
  • Changed the order of pelican.run(), otherwise it was waiting awkwardly for a change before it run at the start.

@justinmayer justinmayer added this to the Pelican 4.9 milestone Oct 28, 2023
Copy link
Member

@justinmayer justinmayer left a comment

Choose a reason for hiding this comment

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

Many thanks to @RealOrangeOne and @avaris for this enhancement! ✨

@justinmayer justinmayer merged commit 3dce25a into getpelican:master Oct 28, 2023
10 checks passed
@RealOrangeOne RealOrangeOne deleted the feature/watchfiles branch October 29, 2023 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants