Re-enabled backups for updating jars.

This commit is contained in:
Andrew McManus 2021-07-26 21:14:36 -04:00
parent a8449cc6f2
commit 67d5723c07

View File

@ -396,8 +396,7 @@ class Server:
def a_jar_update(self):
wasStarted = "-1"
#self.backup_server()
time.sleep(5)
self.backup_server()
#checks if server is running. Calls shutdown if it is running.
if self.check_running():
wasStarted = True
@ -436,7 +435,6 @@ class Server:
db_helper.set_update(self.server_id, True)
pass
logger.info("Executable updated successfully. Starting Server")
time.sleep(5)
db_helper.set_update(self.server_id, False)
if len(websocket_helper.clients) > 0:
@ -447,7 +445,6 @@ class Server:
'server_id': self.server_id,
'wasRunning': wasStarted
})
time.sleep(3)
websocket_helper.broadcast('notification', "Executable update finished for "+self.name)
db_helper.add_to_audit_log_raw('Alert', '-1', self.server_id, "Executable update finished for "+self.name, self.settings['server_ip'])