diff --git a/zengine/management_commands.py b/zengine/management_commands.py index 6d70fd1c..c3ae0c43 100644 --- a/zengine/management_commands.py +++ b/zengine/management_commands.py @@ -168,12 +168,10 @@ class RunWorker(Command): CMD_NAME = 'runworker' HELP = 'Run the workflow worker' PARAMS = [ - # {'name': 'addr', 'default': '127.0.0.1', 'help': 'Listening address. Defaults to 127.0.0.1'}, - # {'name': 'port', 'default': '9001', 'help': 'Listening port. Defaults to 9001'}, {'name': 'workers', 'default': '1', 'help': 'Number of worker process'}, {'name': 'autoreload', 'action': 'store_true', 'help': 'Autoreload on changes'}, {'name': 'paths', 'default': '.', - 'help': 'Directory path(s) for autoreload changes. (comma separated)'}, + 'help': 'Directory path(s) for watching changes for auto-reloading. (whitespace separated)'}, ] @@ -189,7 +187,7 @@ def run(self): if worker_count > 1 or self.manager.args.autoreload: run_workers(worker_count, - self.manager.args.paths.split(','), + self.manager.args.paths.split(' '), self.manager.args.daemonize) else: worker = Worker() diff --git a/zengine/wf_daemon.py b/zengine/wf_daemon.py index 98fbc8c0..e8d93324 100755 --- a/zengine/wf_daemon.py +++ b/zengine/wf_daemon.py @@ -192,6 +192,7 @@ def run_workers(no_subprocess, watch_paths=None, is_background=False): # from watchdog.observers.polling import PollingObserver as Observer from watchdog.events import FileSystemEventHandler + def on_modified(event): if not is_background: print("Restarting worker due to change in %s" % event.src_path) @@ -234,7 +235,8 @@ def kill_children(): if watch_paths: observer = Observer() for path in watch_paths: - print("Watch for changes under %s" % path) + if not is_background: + print("Watching for changes under %s" % path) observer.schedule(handler, path=path, recursive=True) observer.start() while 1: