forked from Github/Axter-Stash
u
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# Get the latest developers version from following link: https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/FileMonitor
|
||||
# Note: To call this script outside of Stash, pass argument --url and the Stash URL.
|
||||
# Example: python filemonitor.py --url http://localhost:9999
|
||||
import os, sys, time, pathlib, argparse, platform, traceback
|
||||
import os, sys, time, pathlib, argparse, platform, traceback, logging
|
||||
from StashPluginHelper import StashPluginHelper
|
||||
import watchdog # pip install watchdog # https://pythonhosted.org/watchdog/
|
||||
from watchdog.observers import Observer # This is also needed for event attributes
|
||||
|
||||
@@ -21,23 +21,23 @@ self_unit_test = {
|
||||
],
|
||||
"task_scheduler_set_time": [
|
||||
# Test [Delete Duplicates] with [Delete Duplicate Scheduler] disabled, and then with it enabled.
|
||||
{"task" : "DupFileManager", "taskName" : "Delete Duplicates", "validateDir" : "DupFileManager", "weekday" : "every", "time" : "09:05"}, # [Plugin Tasks] -> DupFileManager -> [Delete Duplicates]
|
||||
{"task" : "Generate", "weekday" : "every", "time" : "09:05"},
|
||||
{"task" : "Clean", "weekday" : "every", "time" : "09:05"},
|
||||
{"task" : "Auto Tag", "weekday" : "every", "time" : "09:05"},
|
||||
{"task" : "Optimise Database", "weekday" : "every", "time" : "09:05"},
|
||||
{"task" : "pathParser", "taskName" : "Create Tags", "validateDir" : "pathParser", "weekday" : "every", "time" : "09:05"}, # In task queue as -> Running plugin task: Create Tags
|
||||
{"task" : "DupFileManager", "taskMode" : "tag_duplicates_task", "taskQue":False, "weekday" : "every", "time" : "10:09"}, # Does NOT run in the task queue
|
||||
{"task" : "DupFileManager", "taskName" : "Tag Duplicates", "validateDir" : "DupFileManager", "weekday" : "every", "time" : "10:30"}, # [Plugin Tasks] -> DupFileManager -> [Tag Duplicates]
|
||||
{"task" : "Scan","paths": [r"B:\_\SpecialSet", r"C:\foo"], "weekday" : "every", "time" : "09:05"},
|
||||
{"task" : "GQL", "input" : "mutation OptimiseDatabase { optimiseDatabase }", "weekday" : "every", "time" : "09:05"}, # In task queue as -> Optimising database...
|
||||
{"task" : "Clean Generated Files", "weekday" : "every", "time" : "09:05"},
|
||||
{"task" : "RenameGeneratedFiles", "weekday" : "every", "time" : "09:05"}, # In task queue as -> Migrating scene hashes...
|
||||
{"task" : "Backup", "maxBackups" : 0, "weekday" : "every", "time" : "09:05"}, # Does NOT show up in the Task Queue. Must check STASH log file to verify run.
|
||||
{"task" : "python", "script" : "<plugin_path>test_hello_world2.py", "weekday" : "every", "time" : "09:05"}, # Does NOT show up in the Task Queue. Check FileMonitor log file, and look for -> Task 'python' result=???
|
||||
{"task" : "python", "script" : "<plugin_path>test_hello_world.py", "detach" : False, "weekday" : "every", "time" : "09:05"}, # Does NOT show up in the Task Queue. Check FileMonitor log file, and look for -> Task 'python' result=???
|
||||
{"task" : "execute", "command" : "<plugin_path>test_hello_world2.cmd", "weekday" : "every", "time" : "09:05"}, # Does NOT show up in the Task Queue. Check FileMonitor log file, and look for -> Task 'execute' result=???
|
||||
{"task" : "execute", "command" : "<plugin_path>test_hello_world.bat", "args" : "--name David", "weekday" : "every", "time" : "09:05"}, # Does NOT show up in the Task Queue. Check FileMonitor log file, and look for -> Task 'execute' result=???
|
||||
{"task" : "DupFileManager", "taskName" : "Delete Duplicates", "validateDir" : "DupFileManager", "weekday" : "every", "time" : "03:58"}, # [Plugin Tasks] -> DupFileManager -> [Delete Duplicates]
|
||||
{"task" : "Generate", "weekday" : "every", "time" : "03:58"},
|
||||
{"task" : "Clean", "weekday" : "every", "time" : "03:58"},
|
||||
{"task" : "Auto Tag", "weekday" : "every", "time" : "03:58"},
|
||||
{"task" : "Optimise Database", "weekday" : "every", "time" : "03:58"},
|
||||
{"task" : "pathParser", "taskName" : "Create Tags", "validateDir" : "pathParser", "weekday" : "every", "time" : "03:58"}, # In task queue as -> Running plugin task: Create Tags
|
||||
{"task" : "DupFileManager", "taskMode" : "tag_duplicates_task", "taskQue":False, "weekday" : "every", "time" : "1:58"}, # Does NOT run in the task queue
|
||||
{"task" : "DupFileManager", "taskName" : "Tag Duplicates", "validateDir" : "DupFileManager", "weekday" : "every", "time" : "03:58"}, # [Plugin Tasks] -> DupFileManager -> [Tag Duplicates]
|
||||
{"task" : "Scan","paths": [r"B:\_\SpecialSet", r"C:\foo"], "weekday" : "every", "time" : "03:58"},
|
||||
{"task" : "GQL", "input" : "mutation OptimiseDatabase { optimiseDatabase }", "weekday" : "every", "time" : "03:58"}, # In task queue as -> Optimising database...
|
||||
{"task" : "Clean Generated Files", "weekday" : "every", "time" : "03:58"},
|
||||
{"task" : "RenameGeneratedFiles", "weekday" : "every", "time" : "03:58"}, # In task queue as -> Migrating scene hashes...
|
||||
{"task" : "Backup", "maxBackups" : 0, "weekday" : "every", "time" : "03:58"}, # Does NOT show up in the Task Queue. Must check STASH log file to verify run.
|
||||
{"task" : "python", "script" : "<plugin_path>test_hello_world2.py", "weekday" : "every", "time" : "03:58"}, # Does NOT show up in the Task Queue. Check FileMonitor log file, and look for -> Task 'python' result=???
|
||||
{"task" : "python", "script" : "<plugin_path>test_hello_world.py", "detach" : False, "weekday" : "every", "time" : "03:58"}, # Does NOT show up in the Task Queue. Check FileMonitor log file, and look for -> Task 'python' result=???
|
||||
{"task" : "execute", "command" : "<plugin_path>test_hello_world2.cmd", "weekday" : "every", "time" : "03:58"}, # Does NOT show up in the Task Queue. Check FileMonitor log file, and look for -> Task 'execute' result=???
|
||||
{"task" : "execute", "command" : "<plugin_path>test_hello_world.bat", "args" : "--name David", "weekday" : "every", "time" : "03:58"}, # Does NOT show up in the Task Queue. Check FileMonitor log file, and look for -> Task 'execute' result=???
|
||||
],
|
||||
# MUST ToDo: Always set selfUnitTest to False before checking in this code!!!
|
||||
"selfUnitTest_repeat" : False , # Enable to turn on self unit test.
|
||||
|
||||
Reference in New Issue
Block a user