Use minimum speed
parent
c153d07fa4
commit
c070a5324b
|
|
@ -12,7 +12,7 @@ ros_dynamic_speed: true
|
||||||
ros_fasttrack_comment: 'defconf: fasttrack'
|
ros_fasttrack_comment: 'defconf: fasttrack'
|
||||||
ros_ip: 192.168.88.1
|
ros_ip: 192.168.88.1
|
||||||
ros_maximum_speed: 15000000
|
ros_maximum_speed: 15000000
|
||||||
ros_minimum_speed: 100000
|
ros_minimum_speed: 300000
|
||||||
speedtest_threads: 4
|
speedtest_threads: 4
|
||||||
speedtest_master_threads: 4
|
speedtest_master_threads: 4
|
||||||
ros_queues:
|
ros_queues:
|
||||||
|
|
|
||||||
|
|
@ -247,8 +247,18 @@ def ros_dynamic_speed(upload, download):
|
||||||
"all" in config['ros_queues'] and queue["name"] not in config['ros_queues_except']):
|
"all" in config['ros_queues'] and queue["name"] not in config['ros_queues_except']):
|
||||||
if queue['name'] in data_dict['wan_downloads']:
|
if queue['name'] in data_dict['wan_downloads']:
|
||||||
log.info(f"{queue['name']} found in data dict, setting individual limit.")
|
log.info(f"{queue['name']} found in data dict, setting individual limit.")
|
||||||
down = data_dict['wan_downloads'][queue['name']]
|
|
||||||
up = data_dict['wan_uploads'][queue['name']]
|
# Check if below minimum speed
|
||||||
|
if data_dict['wan_downloads'][queue['name']] < config['ros_minimum_speed']:
|
||||||
|
down = config['ros_minimum_speed']
|
||||||
|
else:
|
||||||
|
down = data_dict['wan_downloads'][queue['name']]
|
||||||
|
|
||||||
|
# Check if below minimum speed
|
||||||
|
if data_dict['wan_uploads'][queue['name']] < config['ros_minimum_speed']:
|
||||||
|
up = config['ros_minimum_speed']
|
||||||
|
else:
|
||||||
|
up = data_dict['wan_uploads'][queue['name']]
|
||||||
else:
|
else:
|
||||||
log.info(f"{queue['name']} was not found in data dict, setting total limit.")
|
log.info(f"{queue['name']} was not found in data dict, setting total limit.")
|
||||||
log.debug(data_dict)
|
log.debug(data_dict)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue