change README.md and config.py.default
This commit is contained in:
@@ -205,8 +205,13 @@ class Pyinotifyd:
|
||||
self._watches = []
|
||||
self._watches.extend(watches)
|
||||
|
||||
def add_watch(self, *args, **kwargs):
|
||||
self._watches.append(Watch(*args, **kwargs))
|
||||
def add_watch(self, *args, watch=None, **kwargs):
|
||||
if watch:
|
||||
assert isinstance(watch, Watch), \
|
||||
f"watch: expected {type(Watch)}, got {type(watch)}"
|
||||
self._watches.append(watch)
|
||||
else:
|
||||
self._watches.append(Watch(*args, **kwargs))
|
||||
|
||||
def set_shutdown_timeout(self, timeout):
|
||||
assert isinstance(timeout, int), \
|
||||
@@ -344,12 +349,12 @@ def main():
|
||||
exclusive.add_argument(
|
||||
"-i",
|
||||
"--install",
|
||||
help="install systemd service file",
|
||||
help="install service files and config",
|
||||
action="store_true")
|
||||
exclusive.add_argument(
|
||||
"-u",
|
||||
"--uninstall",
|
||||
help="uninstall systemd service file",
|
||||
help="uninstall service files and unmodified config",
|
||||
action="store_true")
|
||||
exclusive.add_argument(
|
||||
"-t",
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
# TaskScheduler config #
|
||||
##########################
|
||||
|
||||
#async def custom_task(event, task_id):
|
||||
#async def custom_job(event, task_id):
|
||||
# logging.info(f"{task_id}: execute example task: {event}")
|
||||
#
|
||||
#task_sched = TaskScheduler(
|
||||
# task=custom_task,
|
||||
# job=custom_job,
|
||||
# files=True,
|
||||
# dirs=False,
|
||||
# delay=10)
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#move_rule = Rule(
|
||||
# action="move",
|
||||
# src_re="^(?P<path>.*).to_move",
|
||||
# dst_re="\g<path>.moved",
|
||||
# src_re="^/src_path/(?P<path>.*).to_move",
|
||||
# dst_re="/dst_path/\g<path>.moved",
|
||||
# auto_create=True,
|
||||
# filemode=0o755,
|
||||
# dirmode=0o644,
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#delete_rule = Rule(
|
||||
# action="delete",
|
||||
# src_re="^(?P<path>.*).to_delete",
|
||||
# src_re="^/src_path/(?P<path>.*).to_delete",
|
||||
# rec=False)
|
||||
|
||||
#file_sched = FileManagerScheduler(
|
||||
|
||||
Reference in New Issue
Block a user