mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Restart unicorn when any settings.yml changes. (#30577)
This change expands the matcher added in 02bebb7e91 to include plugin `settings.yml` files as requiring a server restart when they change.
The `Listen.to(only: ...)` filter only matches against filenames (as opposed to full paths) so we can't add a matcher against `plugins/.*/config/settings.yml` to make it explicit.
This commit is contained in:
@@ -29,7 +29,8 @@ if Rails.env.development? && !Rails.configuration.cache_classes && Discourse.run
|
||||
Listen
|
||||
.to(
|
||||
*paths,
|
||||
only: /\.rb|site_settings.yml$/,
|
||||
# Aside from .rb files, this will also match site_settings.yml, as well as any plugin settings.yml files.
|
||||
only: /(\.rb|settings.yml)$/,
|
||||
ignore: [/node_modules/],
|
||||
) do |modified, added, removed|
|
||||
supervisor_pid = UNICORN_DEV_SUPERVISOR_PID
|
||||
|
||||
Reference in New Issue
Block a user