forked from Github/Axter-Stash
Moved turnOnScheduler option to UI
This commit is contained in:
@@ -30,6 +30,7 @@ if parse_args.quit:
|
||||
|
||||
settings = {
|
||||
"recursiveDisabled": False,
|
||||
"turnOnScheduler": False,
|
||||
"zzdebugTracing": False,
|
||||
"zzdryRun": False,
|
||||
}
|
||||
@@ -137,7 +138,7 @@ def reoccurringScheduler():
|
||||
def checkSchedulePending():
|
||||
import schedule # pip install schedule # https://github.com/dbader/schedule
|
||||
schedule.run_pending()
|
||||
if plugin.pluginConfig['turnOnScheduler']:
|
||||
if plugin.pluginSettings['turnOnScheduler']:
|
||||
reoccurringScheduler()
|
||||
|
||||
def start_library_monitor():
|
||||
@@ -244,7 +245,7 @@ def start_library_monitor():
|
||||
if shm_buffer[0] != CONTINUE_RUNNING_SIG:
|
||||
plugin.Log(f"Breaking out of loop. (shm_buffer[0]={shm_buffer[0]})")
|
||||
break
|
||||
if plugin.pluginConfig['turnOnScheduler']:
|
||||
if plugin.pluginSettings['turnOnScheduler']:
|
||||
checkSchedulePending()
|
||||
plugin.Trace("Wait start")
|
||||
if plugin.CALLED_AS_STASH_PLUGIN:
|
||||
|
||||
@@ -7,6 +7,10 @@ settings:
|
||||
displayName: No Recursive
|
||||
description: Enable to STOP monitoring paths recursively.
|
||||
type: BOOLEAN
|
||||
turnOnScheduler:
|
||||
displayName: Scheduler
|
||||
description: Enable to turn on the scheduler. See filemonitor_config.py for more details.
|
||||
type: BOOLEAN
|
||||
zzdebugTracing:
|
||||
displayName: Debug Tracing
|
||||
description: (Default=false) [***For Advanced Users***] Enable debug tracing. When enabled, additional tracing logging is added to Stash\plugins\FileMonitor\filemonitor.log
|
||||
|
||||
@@ -18,8 +18,6 @@ config = {
|
||||
"runCleanAfterDelete": False,
|
||||
|
||||
# The scheduler my only work reliably when FileMonitor runs as a service.
|
||||
# Enable to turn on scheduler_task_list
|
||||
"turnOnScheduler": True,
|
||||
# Reoccurring scheduler task list.
|
||||
"task_reoccurring_scheduler": [
|
||||
# Frequency can be in minutes, hours, or days.
|
||||
|
||||
Reference in New Issue
Block a user