mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 03:22:43 +08: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:
parent
17f4052068
commit
7922e6bfc0
|
@ -29,7 +29,8 @@ if Rails.env.development? && !Rails.configuration.cache_classes && Discourse.run
|
||||||
Listen
|
Listen
|
||||||
.to(
|
.to(
|
||||||
*paths,
|
*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/],
|
ignore: [/node_modules/],
|
||||||
) do |modified, added, removed|
|
) do |modified, added, removed|
|
||||||
supervisor_pid = UNICORN_DEV_SUPERVISOR_PID
|
supervisor_pid = UNICORN_DEV_SUPERVISOR_PID
|
||||||
|
|
Loading…
Reference in New Issue
Block a user