Skip to content

Commit

Permalink
Pass along extra_files param to run_with_reloader
Browse files Browse the repository at this point in the history
  • Loading branch information
bjamil committed Jun 18, 2015
1 parent 2945f6c commit 096350a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flask_socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ def run(self, app, host=None, port=None, **kwargs):
5000.
:param use_reloader: ``True`` to enable the Flask reloader, ``False``
to disable it.
:param extra_files: A list of additional files that the Flask
reloader should observe. Defaults to ``None``
:param resource: The SocketIO resource name. Defaults to
``'socket.io'``. Leave this as is unless you know what
you are doing.
Expand Down Expand Up @@ -396,6 +398,7 @@ def run(self, app, host=None, port=None, **kwargs):
port = 5000
resource = kwargs.pop('resource', 'socket.io')
use_reloader = kwargs.pop('use_reloader', app.debug)
extra_files = kwargs.pop('extra_files', None)

self.server = SocketIOServer((host, port), app.wsgi_app,
resource=resource, **kwargs)
Expand All @@ -408,7 +411,7 @@ def run_server():
self.server.serve_forever()
if os.environ.get('WERKZEUG_RUN_MAIN') != 'true':
_log('info', ' * Running on http://%s:%d/' % (host, port))
run_with_reloader(run_server)
run_with_reloader(run_server, extra_files=extra_files)
else:
_log('info', ' * Running on http://%s:%d/' % (host, port))
self.server.serve_forever()
Expand Down

0 comments on commit 096350a

Please sign in to comment.