Skip to content

Simplify adding extra files to watch during development #43

@honzajavorek

Description

@honzajavorek

During development, Werkzeug's reloader watches just Python files and Jinja templates. Normally, this can be extended by the extra_files keyword argument:

app.run(host='0.0.0.0', ..., extra_files=['woohoo.yml'])

Elsa doesn't support this:

app.run(host='0.0.0.0', port=port, debug=True)

Following workaround works, but it would be nice if Elsa was able to propagate the option in some way, out of the box.

from flask import Flask as BaseFlask


class Flask(BaseFlask):
    def run(self, *args, **kwargs):
        kwargs.setdefault('extra_files', [])
        kwargs['extra_files'].append('.../data.yml')
        return super().run(*args, **kwargs)


app = Flask(__name__)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions