forked from Github/Axter-Stash
u
This commit is contained in:
@@ -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 = []
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user