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 3 commits into from Oct 30, 2014


Copy link

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.

Copy link

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

Choose a reason for hiding this comment

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

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

d0ugal commented Oct 30, 2014


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

Successfully merging this pull request may close these issues.

None yet

3 participants