DEV
- update constants - remove fr filter
This commit is contained in:
5
.pydevproject
Normal file
5
.pydevproject
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?eclipse-pydev version="1.0"?><pydev_project>
|
||||||
|
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||||
|
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
|
||||||
|
</pydev_project>
|
||||||
@@ -31,7 +31,7 @@ from dns import resolver,reversename
|
|||||||
|
|
||||||
DEFAULT__Cache_Expiration_Second = 600
|
DEFAULT__Cache_Expiration_Second = 600
|
||||||
DEFAULT__Cache_Size_Entries = 2048
|
DEFAULT__Cache_Size_Entries = 2048
|
||||||
DEFAULT__IpDataSet_UpdatePeriod_Second = 120
|
DEFAULT__IpDataSet_UpdatePeriod_Second = 3600
|
||||||
DEFAULT__Num_IpDataSet_Workers = 10
|
DEFAULT__Num_IpDataSet_Workers = 10
|
||||||
DEFAULT__IpDataSet_GitRepo_Address = "https://chacha.ddns.net/gitea/chacha/country-ip-blocks"
|
DEFAULT__IpDataSet_GitRepo_Address = "https://chacha.ddns.net/gitea/chacha/country-ip-blocks"
|
||||||
DEFAULT__IpDataSet_ipv4_subdir = "ipv4"
|
DEFAULT__IpDataSet_ipv4_subdir = "ipv4"
|
||||||
@@ -119,20 +119,20 @@ class ChaChaIPToCountryStorage:
|
|||||||
for entry in entries:
|
for entry in entries:
|
||||||
entry_path = os.path.join(self.ipv4_dir,entry.name)
|
entry_path = os.path.join(self.ipv4_dir,entry.name)
|
||||||
entry_code = Path(entry_path).stem
|
entry_code = Path(entry_path).stem
|
||||||
if entry_code not in ["fr"]: continue
|
#if entry_code not in ["fr"]: continue
|
||||||
task = loop.run_in_executor(_executor,processfile,entry_path,entry_code)
|
task = loop.run_in_executor(_executor,processfile,entry_path,entry_code)
|
||||||
tasksIPV4.append(task)
|
tasksIPV4.append(task)
|
||||||
print("Done")
|
print("Done")
|
||||||
|
|
||||||
#print("Parsing IPV6 dataset")
|
print("Parsing IPV6 dataset")
|
||||||
#with os.scandir(self.ipv6_dir) as entries:
|
with os.scandir(self.ipv6_dir) as entries:
|
||||||
# for entry in entries:
|
for entry in entries:
|
||||||
# entry_path = os.path.join(self.ipv6_dir,entry.name)
|
entry_path = os.path.join(self.ipv6_dir,entry.name)
|
||||||
# entry_code = Path(entry_path).stem
|
entry_code = Path(entry_path).stem
|
||||||
# if entry_code not in ["fr"]: continue
|
#if entry_code not in ["fr"]: continue
|
||||||
# task = loop.run_in_executor(_executor,processfile,entry_path,entry_code)
|
task = loop.run_in_executor(_executor,processfile,entry_path,entry_code)
|
||||||
# tasksIPV6.append(task)
|
tasksIPV6.append(task)
|
||||||
#print("Done")
|
print("Done")
|
||||||
|
|
||||||
print("Wait IPV4 parsing to complete...")
|
print("Wait IPV4 parsing to complete...")
|
||||||
results = await asyncio.gather(*tasksIPV4)
|
results = await asyncio.gather(*tasksIPV4)
|
||||||
|
|||||||
Reference in New Issue
Block a user