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