Skip to content

Commit

Permalink
Force polling option on auto_restart
Browse files Browse the repository at this point in the history
  • Loading branch information
javaguirre authored and BoboTiG committed Feb 16, 2019
1 parent 19eb494 commit 7a726d1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/watchdog/watchmedo.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ def shell_command(args):
dest='signal',
default='SIGINT',
help='stop the subprocess with this signal (default SIGINT)')
@arg('--debug-force-polling',
default=False,
help='[debug] forces polling')
@arg('--kill-after',
dest='kill_after',
default=10.0,
Expand All @@ -514,7 +517,12 @@ def auto_restart(args):
:param args:
Command line argument options.
"""
from watchdog.observers import Observer

if args.debug_force_polling:
from watchdog.observers.polling import PollingObserver as Observer
else:
from watchdog.observers import Observer

from watchdog.tricks import AutoRestartTrick
import signal
import re
Expand Down

0 comments on commit 7a726d1

Please sign in to comment.