mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
add route to trigger Populate
+ use instance keys to stop multiple instances of populate + move Populate error to a new file + misc
This commit is contained in:
@@ -7,7 +7,7 @@ from app.lib.populate import Populate, PopulateCancelledError
|
||||
from app.settings import SessionVarKeys, get_flag, get_scan_sleep_time
|
||||
from app.utils.generators import get_random_str
|
||||
from app.utils.threading import background
|
||||
|
||||
from app.logger import log
|
||||
|
||||
@background
|
||||
def run_periodic_scans():
|
||||
@@ -25,6 +25,7 @@ def run_periodic_scans():
|
||||
try:
|
||||
Populate(instance_key=get_random_str())
|
||||
except PopulateCancelledError:
|
||||
log.error("'run_periodic_scans': Periodic scan cancelled.")
|
||||
pass
|
||||
|
||||
sleep_time = get_scan_sleep_time()
|
||||
|
||||
Reference in New Issue
Block a user