This commit is contained in:
David Maisonave
2024-08-11 11:35:31 -04:00
parent a75a1d66be
commit 18c4e03266
2 changed files with 3 additions and 5 deletions

View File

@@ -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 = []

View File

@@ -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