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

Added poll cmdline option

parent 1f08423a
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.
Finish editing this message first!
Please register or to comment