File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
import pathlib
2
2
import platform
3
+ from collections import defaultdict
3
4
from multiprocessing .pool import Pool
4
5
5
6
from wanda .as_filter .as_filter import ASFilter
@@ -88,9 +89,6 @@ def main_customer_filter_lists(
88
89
router_per_as [router_hostname ] = {asn }
89
90
90
91
for ixp in ixp_list :
91
- if ixp ['is_route_server' ]:
92
- continue
93
-
94
92
fc = list (filter (lambda c : c ['id' ] == ixp ['ixp_connection' ]['id' ], connections ))
95
93
connection = fc [0 ]
96
94
@@ -100,6 +98,11 @@ def main_customer_filter_lists(
100
98
if hosts and router_hostname not in hosts :
101
99
continue
102
100
101
+ if ixp ['is_route_server' ]:
102
+ if router_hostname not in router_per_as :
103
+ router_per_as [router_hostname ] = {}
104
+ continue
105
+
103
106
enabled_asn .add (asn )
104
107
105
108
tag_list = map (lambda x : x ['name' ], ixp ['tags' ])
@@ -135,7 +138,7 @@ def main_customer_filter_lists(
135
138
n_worker = max_threads
136
139
l .warning (f"Running with a limited amount of threads, n_worker={ max_threads } " )
137
140
elif system_platform == "Linux" :
138
- n_worker = len (prepared_asns )
141
+ n_worker = max ( len (prepared_asns ), 1 )
139
142
else :
140
143
l .warning ("Running with a limited amount of threads due to OS limitations..." )
141
144
n_worker = 8
You can’t perform that action at this time.
0 commit comments