alfredbaudisch / pardall_markdown

Reactive publishing framework, filesystem-based with support for Markdown, nested hierarchies, and instant content rebuilding. Written in Elixir.
Apache License 2.0
116 stars 8 forks source link

Possible rush condition between FileWatcher and RepositoryWatcher makes FileWatcher ignore file events and makes it never send content to be parsed and built #51

Closed alfredbaudisch closed 3 years ago

alfredbaudisch commented 3 years ago

Sometimes FileWatcher gets stuck and does not react for new file events and does not send content to be rebuilt when it gets started (when the application is started).

Conditions

How to Reproduce

Report

$ iex -S mix phx.server
09:27:42.953 [info][mfa=PardallMarkdown.FileWatcher.handle_info/2 ] Started reloading content...
09:27:43.934 [info][mfa=PardallMarkdown.RepositoryProviders.Git.git_repository/0 ] Cloning repository https://github.com/alfredbaudisch/pardall_markdown_sample_content, into ./sample_content
09:27:43.983 [warn][mfa=PardallMarkdown.FileWatcher.handle_info/2 ] Content reloader is already busy processing 1 event(s) (for a total of 1 pending event(s)). Will re-schedule. If this happens frequently, consider increasing the
09:27:44.484 [info][mfa=PardallMarkdown.RepositoryProviders.Git.repository/0 ] Pulling from git repository Already up to date.
alfredbaudisch commented 3 years ago

Updated from critical to medium-priority because it only happens when root_path still doesn't exist in the server, and is left to be created by RepositoryProviders.Git in the first pull (as soon as the application is started).