Add successful column to server_transfers table, get server transfers working properly :)
This commit is contained in:
parent
6ba6c34252
commit
454ce6ce45
8 changed files with 202 additions and 17 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Pterodactyl\Services\Servers;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Webmozart\Assert\Assert;
|
||||
use Pterodactyl\Models\Server;
|
||||
|
@ -73,10 +74,14 @@ class SuspensionService
|
|||
return;
|
||||
}
|
||||
|
||||
Log::debug('SuspensionService: ' . $action);
|
||||
|
||||
$this->connection->transaction(function () use ($action, $server) {
|
||||
$this->repository->withoutFreshModel()->update($server->id, [
|
||||
'suspended' => $action === self::ACTION_SUSPEND,
|
||||
]);
|
||||
Log::debug('Server suspended: ' . ($action === self::ACTION_SUSPEND) ? 'true' : 'false');
|
||||
Log::debug('Daemon unsuspended: ' . ($action === self::ACTION_UNSUSPEND) ? 'true' : 'false');
|
||||
|
||||
$this->daemonServerRepository->setServer($server)->suspend($action === self::ACTION_UNSUSPEND);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue