Merge branch 'bug/server-startup' into 'dev'

Fix 2 bugs: Stats startup after backup

See merge request crafty-controller/crafty-4!386
This commit is contained in:
Iain Powrie 2022-06-24 02:43:25 +00:00
commit fa01a4a528
2 changed files with 5 additions and 3 deletions

View File

@ -5,6 +5,8 @@
None
### Bug fixes
- Fix cannot delete backup on page 2 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/382))
- Fix server starting up without stats monitoring after backup shutdown. ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/386))
- Fix pathing issue when launching with just "java" ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/386))
### Tweaks
- Rework server list on status page display for use on small screens ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/383))
- Add clone server confirmation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/384))

View File

@ -242,7 +242,7 @@ class ServerInstance:
"Replacing with full java path."
)
# Checks for Oracle Java. Only Oracle Java's helper will cause a re-exec.
if "/Oracle/Java/" in str(shutil.which("java")):
if "/Oracle/Java/" in str(self.helper.wtol_path(shutil.which("java"))):
logger.info(
"Oracle Java detected. Changing start command to avoid re-exec."
)
@ -938,7 +938,7 @@ class ServerInstance:
logger.info(
"Backup complete. User had shutdown preference. Starting server."
)
self.start_server(HelperUsers.get_user_id_by_name("system"))
self.run_threaded_server(HelperUsers.get_user_id_by_name("system"))
time.sleep(3)
self.last_backup_failed = False
except:
@ -958,7 +958,7 @@ class ServerInstance:
logger.info(
"Backup complete. User had shutdown preference. Starting server."
)
self.start_server(HelperUsers.get_user_id_by_name("system"))
self.run_threaded_server(HelperUsers.get_user_id_by_name("system"))
self.last_backup_failed = True
def backup_status(self, source_path, dest_path):