Merge pull request #500 from LibreQoE/post_integration_hooks

Post integration hooks for scheduler.conf
This commit is contained in:
Herbert "TheBracket 2024-07-09 09:04:57 -05:00 committed by GitHub
commit eb592fc8d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,7 @@ if automatic_import_sonar():
from integrationSonar import importFromSonar from integrationSonar import importFromSonar
from apscheduler.schedulers.background import BlockingScheduler from apscheduler.schedulers.background import BlockingScheduler
from apscheduler.executors.pool import ThreadPoolExecutor from apscheduler.executors.pool import ThreadPoolExecutor
import os.path
ads = BlockingScheduler(executors={'default': ThreadPoolExecutor(1)}) ads = BlockingScheduler(executors={'default': ThreadPoolExecutor(1)})
@ -40,6 +41,12 @@ def importFromCRM():
except: except:
print("Failed to import from Sonar") print("Failed to import from Sonar")
# Post-CRM Hooks
path = get_libreqos_directory() + "/bin/post_integration_hook.sh"
binPath = get_libreqos_directory() + "/bin"
if os.path.isfile(path):
subprocess.Popen(path, cwd=binPath)
def graphHandler(): def graphHandler():
try: try:
refreshBandwidthGraphs() refreshBandwidthGraphs()