Skip to content

Commit

Permalink
replace jquery file upload with filepond (idaholab#235, work in progr…
Browse files Browse the repository at this point in the history
…ess)
  • Loading branch information
mmguero committed Aug 9, 2023
1 parent 6daa4c5 commit ceacedf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
12 changes: 12 additions & 0 deletions filebeat/scripts/filebeat-watch-zeeklogs-uploads-folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ def main():
type=str,
required=False,
)
parser.add_argument(
'--recursive',
dest='recursiveAll',
help="Monitor all directories underneath --directory",
metavar='true|false',
type=str2bool,
nargs='?',
const=True,
default=False,
required=False,
)
parser.add_argument(
'-p',
'--polling',
Expand Down Expand Up @@ -224,6 +235,7 @@ def main():
watch_common.WatchAndProcessDirectory(
watchDirs,
args.polling,
args.recursiveAll,
file_processor,
{
"logger": logging,
Expand Down
12 changes: 12 additions & 0 deletions pcap-monitor/scripts/watch-pcap-uploads-folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ def main():
type=str,
required=False,
)
parser.add_argument(
'--recursive',
dest='recursiveAll',
help="Monitor all directories underneath --directory",
metavar='true|false',
type=str2bool,
nargs='?',
const=True,
default=False,
required=False,
)
parser.add_argument(
'-p',
'--polling',
Expand Down Expand Up @@ -244,6 +255,7 @@ def main():
watch_common.WatchAndProcessDirectory(
watchDirs,
args.polling,
args.recursiveAll,
file_processor,
{
"logger": logging,
Expand Down
3 changes: 2 additions & 1 deletion shared/bin/watch_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def ProcessFileEventWorker(workerArgs):
def WatchAndProcessDirectory(
directories,
polling,
recursive,
fileProcessor,
fileProcessorKwargs,
assumeClosedSec,
Expand All @@ -301,7 +302,7 @@ def WatchAndProcessDirectory(
)
for directory in directories:
loggerToUse.info(f"🗐\tScheduling {directory}")
observer.schedule(handler, directory, recursive=True)
observer.schedule(handler, directory, recursive=recursive)

observer.start()
try:
Expand Down

0 comments on commit ceacedf

Please sign in to comment.