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:
Gary Pendergast 2025-01-06 17:43:44 +11:00 committed by GitHub
parent 17f4052068
commit 7922e6bfc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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