forked from organicmaps/organicmaps
[python][generator] Added order in get_mwm_names().
This commit is contained in:
parent
a37850e654
commit
195d9109a8
2 changed files with 5 additions and 4 deletions
|
@ -140,14 +140,14 @@ class Env:
|
|||
|
||||
def get_mwm_names(self):
|
||||
tmp_ext = ".mwm.tmp"
|
||||
mwm_names = []
|
||||
existed_names = set()
|
||||
for f in os.listdir(self.intermediate_tmp_path):
|
||||
path = os.path.join(self.intermediate_tmp_path, f)
|
||||
if f.endswith(tmp_ext) and os.path.isfile(path):
|
||||
name = f.replace(tmp_ext, "")
|
||||
if name in self.countries:
|
||||
mwm_names.append(name)
|
||||
return mwm_names
|
||||
existed_names.add(name)
|
||||
return [c for c in self.countries if c in existed_names]
|
||||
|
||||
def is_accepted_stage(self, stage_name):
|
||||
return stage_name not in self._skipped_stages
|
||||
|
|
|
@ -194,7 +194,8 @@ def stage_mwm(env):
|
|||
|
||||
mwms = env.get_mwm_names()
|
||||
with ThreadPool() as pool:
|
||||
pool.map(lambda c: specific[c](c) if c in specific else build(c), mwms)
|
||||
pool.map(lambda c: specific[c](c) if c in specific else build(c), mwms,
|
||||
chunksize=1)
|
||||
|
||||
|
||||
@stage
|
||||
|
|
Loading…
Add table
Reference in a new issue