end update thread to restart

This commit is contained in:
j 2016-01-13 10:53:12 +05:30
parent 44cb61da96
commit a723709641

View file

@ -265,7 +265,8 @@ class Update(Thread):
self.status('Installing new version...') self.status('Installing new version...')
if not install(False): if not install(False):
self.status('Installation failed...') self.status('Installation failed...')
restart_oml() return True
return False
def update_database(self): def update_database(self):
db_version = settings.server.get('db_version', 0) db_version = settings.server.get('db_version', 0)
@ -277,6 +278,8 @@ class Update(Thread):
def run(self): def run(self):
self.status('Checking for Updates...') self.status('Checking for Updates...')
self.update_database() self.update_database()
self.install() if self.install():
restart_oml()
return
self.status('Restarting...', True) self.status('Restarting...', True)
restart_oml() restart_oml()