Update logic for tracking a server's transfer state
This commit is contained in:
parent
5d03c0d2e5
commit
e6c4a68e4a
20 changed files with 206 additions and 74 deletions
|
@ -24,6 +24,7 @@ class GetUserPermissionsService
|
|||
if ($user->root_admin) {
|
||||
$permissions[] = 'admin.websocket.errors';
|
||||
$permissions[] = 'admin.websocket.install';
|
||||
$permissions[] = 'admin.websocket.transfer';
|
||||
}
|
||||
|
||||
return $permissions;
|
||||
|
|
|
@ -61,7 +61,10 @@ class SuspensionService
|
|||
'suspended' => $action === self::ACTION_SUSPEND,
|
||||
]);
|
||||
|
||||
$this->daemonServerRepository->setServer($server)->suspend($action === self::ACTION_UNSUSPEND);
|
||||
// Only send the suspension request to wings if the server is not currently being transferred.
|
||||
if ($server->transfer === null) {
|
||||
$this->daemonServerRepository->setServer($server)->suspend($action === self::ACTION_UNSUSPEND);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue