From 68e9244306b41e879c5c6e3306340b6edca46856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Wed, 20 Dec 2023 08:46:43 -0700 Subject: [PATCH] Update scheduler.py --- src/scheduler.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/scheduler.py b/src/scheduler.py index 7c5ddf9f..c92af979 100644 --- a/src/scheduler.py +++ b/src/scheduler.py @@ -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()