Skip to content
Snippets Groups Projects
Commit 8f9763d6 authored by Pavel Kácha's avatar Pavel Kácha
Browse files

Added poll cmdline option

parent 02c9417e
No related branches found
No related tags found
No related merge requests found
......@@ -396,6 +396,12 @@ def get_args():
dest="oneshot",
action="store_true",
help="process files and quit (do not daemonize)")
optp.add_option("--poll",
default=1,
dest="poll",
type="int",
action="store",
help="log file polling interval")
optp.add_option("-p", "--pid",
default=pth.join("/var/run", pth.splitext(pth.basename(sys.argv[0]))[0] + ".pid"),
dest="pid",
......@@ -489,7 +495,7 @@ def main():
f.open()
reload_flag = False
if not any(line_set):
time.sleep(1)
time.sleep(opts.poll)
line = ""
aggr = []
for context in contexts:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment