Can't Parsoid be made to listen for SIGHUP and reload config from disk?
On Tue, 2 Oct 2018 at 22:43, Subramanya Sastry <ssastry(a)wikimedia.org>
wrote:
Hello!
This has come up previously (
https://phabricator.wikimedia.org/T100841
) but Parsoid doesn't have this support at this time.
On startup, Parsoid loads wiki configs (from the corresponding mediawiki
API) and caches them in a Map and uses this cached info across requests.
This eliminates the need for Parsoid to look up a wiki's config for
every parse request. The available wikis are read from localsettings.js
once on startup -- the file is not examined after startup. So,
effectively parsoid restart is the only exposed mechanism for reloading
wikis and resetting the cached configs.
But, if you wanted to do dynamic loading of wikis in Parsoid, you will
have to make appropriate changes to Parsoid's config loading mechanism
to expose a dynamic hook and use that. See the bug report for some notes
along these lines.
Hope this helps.
Subbu.
On 09/28/2018 01:46 AM, Robert Vogel wrote:
Hello everybody!
Some time ago, I asked this question on the Wikimedia Development
Support forums
[1], but unfortunately nobody answered. Mabye here on the
mailing list someone can help me.
I want to change the configuration of the Parsoid service dynamically,
without
modifying the `config.yaml`/`localsettings.js` and restarting the
service.
My use case is simple: I need _one_ Parsoid to serve multiple MediaWikis
instances. And I need to be able to add new instances without the need to
reconfigure/restart Parsoid everytime.
The logic would be "If the calling MediaWiki instance sends 'ABC' as a
prefix, the API url of that instance will be '
https://myserver/wikis/ABC/api.php'"39;".
I have the strong feeling that overriding the `parsoidConfig` object in
`localsettings.js` will be the way to go. Am I on the right track?
Your hints and suggestions are much appreciated.
[1]
https://discourse-mediawiki.wmflabs.org/t/dynamic-parsoid-configuration/775
--
Robert Vogel
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l