fix
parent
572fc3af47
commit
18fc489b91
|
|
@ -4,8 +4,7 @@ output_txt_path: /var/www/downloads/speeds.txt
|
|||
ros_dynamic_speed: True
|
||||
ros_ip: 192.168.88.1
|
||||
ros_queues:
|
||||
- WAN
|
||||
- VOIP
|
||||
- all
|
||||
ros_queues_except:
|
||||
- dummy
|
||||
ros_du_invert: False
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import speedtest
|
|||
from dbo import Entry
|
||||
import routeros_api
|
||||
|
||||
|
||||
config = read_config()
|
||||
secrets = read_config('secrets')
|
||||
|
||||
|
|
@ -178,13 +179,15 @@ def ros_dynamic_speed(upload, download):
|
|||
if queue['name'] in config['ros_queues'] or ("all" in config['ros_queues'] and queue["name"] not in config['ros_queues_except']):
|
||||
log.debug(
|
||||
f"Adjust Queue {queue['name']}: max_limit {int(upload)}/{int(download)}")
|
||||
|
||||
if config["ros_du_invert"] == True:
|
||||
# Inverting upload and download values, because master queue is most likely applied to the bridge
|
||||
list_queues.set(id=queue['id'], max_limit=f"{int(download)}/{int(upload)}")
|
||||
else:
|
||||
# Not inverting, use this in case master queue is applied to something like LTE interface
|
||||
list_queues.set(id=queue['id'], max_limit=f"{int(upload)}/{int(download)}")
|
||||
try:
|
||||
if config["ros_du_invert"] == True:
|
||||
# Inverting upload and download values, because master queue is most likely applied to the bridge
|
||||
list_queues.set(id=queue['id'], max_limit=f"{int(download)}/{int(upload)}")
|
||||
else:
|
||||
# Not inverting, use this in case master queue is applied to something like LTE interface
|
||||
list_queues.set(id=queue['id'], max_limit=f"{int(upload)}/{int(download)}")
|
||||
except:
|
||||
log.error("Unable to change queue settings.", exc_info=True)
|
||||
connection.disconnect()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue