Mise à jour de 'ChaChaIPToCountryDaemon/core.py'
- get results in two times to save ram again
This commit is contained in:
@@ -288,6 +288,25 @@ class ChaChaIPToCountryStorage:
|
|||||||
task = loop.run_in_executor(_executor,processIPRangeList,_IPRange_percountry[key],key)
|
task = loop.run_in_executor(_executor,processIPRangeList,_IPRange_percountry[key],key)
|
||||||
tasksIPV6.append(task)
|
tasksIPV6.append(task)
|
||||||
print("IPV6 dataset (CSV) Started")
|
print("IPV6 dataset (CSV) Started")
|
||||||
|
|
||||||
|
print("Wait IPV4 parsing to complete (files)...")
|
||||||
|
results = await asyncio.gather(*tasksIPV4)
|
||||||
|
for _set,_entry_code in results:
|
||||||
|
if _entry_code not in _ipv4set:
|
||||||
|
_ipv4set[_entry_code] = IPSet_nocompact()
|
||||||
|
_ipv4set[_entry_code].update(_set)
|
||||||
|
_ipv4set[_entry_code].ForceCompact()
|
||||||
|
print("Done")
|
||||||
|
|
||||||
|
if DEFAULT__EnableIPV6:
|
||||||
|
print("Wait IPV6 parsing to complete (files)...")
|
||||||
|
results = await asyncio.gather(*tasksIPV6)
|
||||||
|
for _set,_entry_code in results:
|
||||||
|
if _entry_code not in _ipv6set:
|
||||||
|
_ipv6set[_entry_code] = IPSet_nocompact()
|
||||||
|
_ipv6set[_entry_code].update(_set)
|
||||||
|
_ipv6set[_entry_code].ForceCompact()
|
||||||
|
print("Done")
|
||||||
|
|
||||||
#Add private network at the end
|
#Add private network at the end
|
||||||
tasksIPV4.append( loop.run_in_executor(_executor,processIPRangeList,IPRange("192.168.0.0", "192.168.255.255"), "ZZ"))
|
tasksIPV4.append( loop.run_in_executor(_executor,processIPRangeList,IPRange("192.168.0.0", "192.168.255.255"), "ZZ"))
|
||||||
|
|||||||
Reference in New Issue
Block a user