Update scheduler.py

This commit is contained in:
Robert Chacón 2023-12-20 08:46:43 -07:00 committed by GitHub
parent 358fb4189f
commit 68e9244306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ import time
import datetime
from LibreQoS import refreshShapers, refreshShapersUpdateOnly
from graphInfluxDB import refreshBandwidthGraphs, refreshLatencyGraphs
from ispConfig import influxDBEnabled, automaticImportUISP, automaticImportSplynx, automaticImportSonar
from ispConfig import influxDBEnabled, automaticImportUISP, automaticImportSplynx
try:
from ispConfig import queueRefreshIntervalMins
except:
@ -11,6 +11,16 @@ if automaticImportUISP:
from integrationUISP import importFromUISP
if automaticImportSplynx:
from integrationSplynx import importFromSplynx
try:
from ispConfig import automaticImportPowercode
except:
automaticImportPowercode = False
if automaticImportPowercode:
from integrationPowercode import importFromPowercode
try:
from ispConfig import automaticImportSonar
except:
automaticImportSonar = False
if automaticImportSonar:
from integrationSonar import importFromSonar
from apscheduler.schedulers.background import BlockingScheduler
@ -29,6 +39,11 @@ def importFromCRM():
importFromSplynx()
except:
print("Failed to import from Splynx")
elif automaticImportPowercode:
try:
importFromPowercode()
except:
print("Failed to import from Powercode")
elif automaticImportSonar:
try:
importFromSonar()