Add support for slowloading skills

Upgrade msm to 0.7.8

Using the new max_threads parameters to MycroftSkillsManager.apply() the
skill loading is reduced to 2 threads if it's during runtime while a
fast update (20 threads) are used if not all default skills are
installed to speed up getting core into a 100% operational state.
pull/2197/head
Åke Forslund 2019-07-02 12:19:14 +02:00
parent fe31564114
commit 58cab5cddb
2 changed files with 7 additions and 3 deletions

View File

@ -161,7 +161,7 @@ class SkillManager(Thread):
with open(self.installed_skills_file, 'w') as f:
f.write('\n'.join(skill_names))
def download_skills(self, speak=False):
def download_skills(self, speak=False, quick=False):
""" Invoke MSM to install default skills and/or update installed skills
Args:
@ -218,7 +218,11 @@ class SkillManager(Thread):
raise
installed_skills.add(skill.name)
try:
msm.apply(install_or_update, msm.list())
# If defaults are installed
defaults = all([s.is_local for s in msm.list_defaults()])
num_threads = 20 if not defaults or quick else 2
msm.apply(install_or_update, msm.list(),
max_threads=num_threads)
if SkillManager.manifest_upload_allowed and is_paired():
try:
DeviceApi().upload_skills_data(msm.skills_data)

View File

@ -24,7 +24,7 @@ google-api-python-client==1.6.4
fasteners==0.14.1
PyYAML==3.13
msm==0.7.7
msm==0.7.8
msk==0.3.13
adapt-parser==0.3.3
padatious==0.4.6