Open Siguza opened 10 years ago
I don't really like both of them. Actually we should just listen for file changes, which unfortunately may not be as trivial. So we may have to stick with one of those.
I'll think about this.
Well, all target OS'es support file system events, which should be accessible from C code... this would be the cleanest option, but also the one requiring the most work.
I would actually prefer an option in the admin panel, where you can force the event system to reload the config.
Reasoning:
Actually... just schedule a config reload for the event system when something is changed via the config editor. If someone can edit the config file directly, they can also restart the event system by themselves.
The event system should detect config changes and reload the config when necessary. (Either to be implemented via the config editor in the admin panel (insert into db table, read that from event system) or by caching and comparing the "file changed" timestamp (I favour this method)).