Merge branch 'bug/pretzel-backup-restart' into 'dev'

Backup Shutdown/restart bug

See merge request crafty-controller/crafty-4!414
This commit is contained in:
Iain Powrie 2022-08-04 23:27:46 +00:00
commit 476b00a807
2 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,7 @@ TBD
### Bug fixes
- Fix SU status not sticking on user creation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/410))
- Handle Missing Java From Win Registry ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/413))
- Disable restart while server is backing up ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/414))
### Tweaks
TBD
### Lang

View File

@ -656,6 +656,13 @@ class ServerInstance:
self.helper.websocket_helper.broadcast_user(user, "send_start_reload", {})
def restart_threaded_server(self, user_id):
bu_conf = HelpersManagement.get_backup_config(self.server_id)
if self.is_backingup and bu_conf["shutdown"]:
logger.info(
"Restart command detected. Supressing - server has"
" backup shutdown enabled and server is currently backing up."
)
return
# if not already running, let's just start
if not self.check_running():
self.run_threaded_server(user_id)