-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
kiwix-serve can monitor and reload the library automatically #503
Conversation
@veloman-yunkan Thx for the PR. What does your last comment means regarding Windows? iMO It shoukd works the same whatever the platform. It should be optional as well, something like —monitorLibrary. |
8897c71
to
2886e7b
Compare
@kelson42 I included the fix in the Windows build too (but didn't test it). I also added the Note that the support for reloading the library on SIGHUP was dropped. Should I restore it? |
Thx for your quick move based on my comment. Sounds good. Hmmm, yes definitly... I don't really understand why this has been dropped, we just introduced it! From a general point of view (kind of mine):
|
@kelson42 I thought that forced library reloading on SIGHUP was a temporary solution until automatic reloading is implemented. I will restore it shortly. |
OK. No, it is an alternative. |
2886e7b
to
7985ba1
Compare
@kelson42 Handling of SIGHUP is restored. The PR seems to be final (pending only review by @mgautierfr). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #476
If started with the
--monitorLibrary
option (or its short variant-M
)kiwix-serve
monitors the input library files and reloads the library automatically.Only the timestamp of the library file(s) is monitored (if there are multiple library files the most recently modified file's timestamp is used). The library is reloaded when the monitored timestamp grows.
SIGHUP makes
kiwix-serve
to reload the library unconditionally (even if the file hasn't changed).