diff --git a/mycroft/configuration/mycroft.conf b/mycroft/configuration/mycroft.conf index b79e87f97b..ddec2be9d1 100644 --- a/mycroft/configuration/mycroft.conf +++ b/mycroft/configuration/mycroft.conf @@ -105,8 +105,8 @@ "blacklisted_skills": ["skill-media", "send_sms", "skill-wolfram-alpha"], // priority skills to be loaded first "priority_skills": ["mycroft-pairing", "mycroft-volume"], - // Minimum time since last skill updata to force an update on startup - "startup_update_required_time": 12 + // Time between updating skills in hours + "update_interval": 1.0 }, // Address of the REMOTE server diff --git a/mycroft/skills/main.py b/mycroft/skills/main.py index 21ea8aad29..1fcd03a93f 100644 --- a/mycroft/skills/main.py +++ b/mycroft/skills/main.py @@ -203,9 +203,12 @@ class SkillManager(Thread): self.enclosure = EnclosureAPI(ws) # Schedule install/update of default skill + self.update_interval = Configuration.get()['skills']['update_interval'] + self.update_interval = int(self.update_interval * 60 * MINUTES) self.dot_msm = join(SKILLS_DIR, '.msm') if exists(self.dot_msm): - self.next_download = os.path.getmtime(self.dot_msm) + 60 * MINUTES + self.next_download = os.path.getmtime(self.dot_msm) + \ + self.update_interval else: self.next_download = time.time() - 1 @@ -294,7 +297,7 @@ class SkillManager(Thread): with open(self.dot_msm, 'a'): os.utime(self.dot_msm, None) - self.next_download = time.time() + 60 * MINUTES + self.next_download = time.time() + self.update_interval if speak: data = {'utterance': dialog.get("skills updated")}