Skip to content

Use watchfiles as a file watching backend - #3151

Merged
justinmayer merged 7 commits into
getpelican:masterfrom
RealOrangeOne:feature/watchfiles
Oct 28, 2023
Merged

justinmayer merged 7 commits into
getpelican:masterfrom
RealOrangeOne:feature/watchfiles

Conversation

@RealOrangeOne

Copy link
Copy Markdown
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

avaris commented Jun 22, 2023

Copy link
Copy Markdown
Member

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

@avaris avaris left a comment

Copy link
Copy Markdown
Member

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.

Comment thread pelican/utils.py Resolved
@RealOrangeOne
RealOrangeOne requested a review from avaris August 15, 2023 18:48
@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.

@avaris avaris left a comment

Copy link
Copy Markdown
Member

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

@justinmayer justinmayer left a comment

Copy link
Copy Markdown
Member

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
@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