From 18c4e0326620e54d1824489a2e5d25b33c671810 Mon Sep 17 00:00:00 2001 From: David Maisonave <47364845+David-Maisonave@users.noreply.github.com> Date: Sun, 11 Aug 2024 11:35:31 -0400 Subject: [PATCH] u --- plugins/FileMonitor/filemonitor.py | 6 ++---- plugins/FileMonitor/filemonitor_config.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/FileMonitor/filemonitor.py b/plugins/FileMonitor/filemonitor.py index aa7bc2b..e609a77 100644 --- a/plugins/FileMonitor/filemonitor.py +++ b/plugins/FileMonitor/filemonitor.py @@ -263,6 +263,7 @@ def start_library_monitor(): TmpTargetPaths = [] with mutex: while not shouldUpdate: + plugin.Trace("While not shouldUpdate") if plugin.CALLED_AS_STASH_PLUGIN and isJobWaitingToRun(): if FileMonitorPluginIsOnTaskQue: plugin.Log(f"Another task (JobID={JobIdInTheQue}) is waiting on the queue. Will restart FileMonitor to allow other task to run.") @@ -276,10 +277,7 @@ def start_library_monitor(): if plugin.pluginSettings['turnOnScheduler']: checkSchedulePending() plugin.Trace("Wait start") - if plugin.CALLED_AS_STASH_PLUGIN: - signal.wait(timeout=SIGNAL_TIMEOUT) - else: - signal.wait() + signal.wait(timeout=SIGNAL_TIMEOUT) plugin.Trace("Wait end") shouldUpdate = False TmpTargetPaths = [] diff --git a/plugins/FileMonitor/filemonitor_config.py b/plugins/FileMonitor/filemonitor_config.py index 78c1e76..ea7784d 100644 --- a/plugins/FileMonitor/filemonitor_config.py +++ b/plugins/FileMonitor/filemonitor_config.py @@ -9,7 +9,7 @@ config = { # Enable to monitor changes in file system for modification flag. This option is NOT needed for Windows, because on Windows changes are triggered via CREATE, DELETE, and MOVE flags. Other OS may differ. "scanModified": False, # Timeout in seconds. This is how often it will check if another job (Task) is in the queue. - "timeOut": 15, # Not needed when running in command line mode. + "timeOut": 60, # Not needed when running in command line mode. # Enable to exit FileMonitor by creating special file in plugin folder\working "createSpecFileToExit": True, # Enable to delete special file imediately after it's created in stop process