fix: stopping a resource is now job based
ui: show status on project
This commit is contained in:
19
app/Actions/Database/StopDatabaseProxy.php
Normal file
19
app/Actions/Database/StopDatabaseProxy.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Database;
|
||||
|
||||
use App\Models\StandalonePostgresql;
|
||||
use App\Models\StandaloneRedis;
|
||||
use Lorisleiva\Actions\Concerns\AsAction;
|
||||
|
||||
class StopDatabaseProxy
|
||||
{
|
||||
use AsAction;
|
||||
|
||||
public function handle(StandaloneRedis|StandalonePostgresql $database)
|
||||
{
|
||||
instant_remote_process(["docker rm -f {$database->uuid}-proxy"], $database->destination->server);
|
||||
$database->is_public = false;
|
||||
$database->save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user