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

Replace inotify with polling observer #184

Merged
merged 3 commits into from Oct 30, 2014

Conversation

@robinandeer
Copy link
Contributor

@robinandeer robinandeer commented Oct 30, 2014

I opened #178 to discuss my issues running mkdocs inside Docker/Vagrant setups. After talking to a watchdog developer, he suggested using a PollingObserver which is a more universal approach but likely also a little bit slower.

I believe these changes will allow auto-reload to work inside shared folders. My brief testing suggests so anyhow. Existing users shouldn't notice any difference.

I absolutely couldn't figure out any sensible way to unit test my four line pull request. I also didn't find any place in the project documentation to write about it.

@tomchristie
Copy link
Contributor

@tomchristie tomchristie commented Oct 30, 2014

I also didn't find any place in the project documentation to write about it.

We shouldn't need to. This is just under the hood stuff that makes the auto-reload work more consistently.

@@ -84,7 +85,8 @@ def serve(config, options=None):
# can re-apply them if the config file is reloaded.
event_handler = BuildEventHandler(options)
config_event_handler = ConfigEventHandler(options)
observer = observers.Observer()
# Use highly universal `PollingObserver`

This comment has been minimized.

@tomchristie

tomchristie Oct 30, 2014
Contributor

Let's expand on that slightly.

# We could have used `Observer()`, which can be faster, but `PollingObserver()` works more universally.
d0ugal added a commit that referenced this pull request Oct 30, 2014
Replace inotify with polling observer
@d0ugal d0ugal merged commit 1525616 into mkdocs:master Oct 30, 2014
1 check passed
1 check passed
@tomchristie
continuous-integration/travis-ci The Travis CI build passed
Details
@d0ugal
Copy link
Member

@d0ugal d0ugal commented Oct 30, 2014

Thanks!

@d0ugal d0ugal mentioned this pull request Oct 30, 2014
@d0ugal d0ugal added this to the 0.11.0 milestone Oct 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants