benoitc/gunicorn

`reload_extra_files` should accept wildcards

Open

#1.643 geöffnet am 14. Nov. 2017

Auf GitHub ansehen
 (5 Kommentare) (14 Reaktionen) (0 zugewiesene Personen)Python (1.707 Forks)batch import
Feature/Reloadgood first issue

Repository-Metriken

Stars
 (9.334 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8h 8m) (1 gemergte PR in 30 T)

Beschreibung

Hi,

My app structure is such that each view in my app has it's own config.json located at ui/<view_name>/config.json.

I would love to reload on modification for each of those JSON files.

Currently, I'm doing, for each view:

reload_extra_file = [
  'ui/<view_1>/config.json',
  'ui/<view_2>/config.json',
  'ui/<view_3>/config.json,
  ...
]

but this is a little cumbersome, since I have to add a new line everytime I add a view to my app (and I tend to forget about it).

We should support wildcards for this kind of use case, something like:

reload_extra_file = ['*.json', '*.js', '*.py', '*.yaml']

@benoitc Is that something you would consider implementing ? I can maybe help with this and create a PR if you let me know where this needs to be changed in the current code.

Contributor Guide