cleanups
This commit is contained in:
parent
275edb6c1f
commit
f1587d3302
5 changed files with 8 additions and 6 deletions
|
|
@ -19,7 +19,6 @@ public function mount(string $server_uuid)
|
|||
try {
|
||||
$this->networks = collect();
|
||||
$this->server = Server::ownedByCurrentTeam()->whereUuid($server_uuid)->firstOrFail();
|
||||
loggy($this->server);
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1229,7 +1229,7 @@ public function isIpv6(): bool
|
|||
return str($this->ip)->contains(':');
|
||||
}
|
||||
|
||||
public function restartSentinel(bool $async = true): void
|
||||
public function restartSentinel(bool $async = true)
|
||||
{
|
||||
try {
|
||||
if ($async) {
|
||||
|
|
@ -1238,7 +1238,7 @@ public function restartSentinel(bool $async = true): void
|
|||
StartSentinel::run($this, true);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
loggy('Error restarting Sentinel: '.$e->getMessage());
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
|
|
@ -69,7 +70,7 @@ protected static function booted()
|
|||
$setting->generateSentinelUrl(save: false);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
loggy('Error creating server setting: '.$e->getMessage());
|
||||
Log::error('Error creating server setting: '.$e->getMessage());
|
||||
}
|
||||
});
|
||||
static::updated(function ($settings) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Visus\Cuid2\Cuid2;
|
||||
|
||||
|
|
@ -52,7 +53,7 @@ public function up(): void
|
|||
|
||||
DB::table('server_settings')->update(['metrics_history_days' => 7]);
|
||||
} catch (\Exception $e) {
|
||||
loggy($e);
|
||||
Log::error('Error updating db: '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class SentinelSeeder extends Seeder
|
||||
{
|
||||
|
|
@ -23,7 +24,7 @@ public function run()
|
|||
}
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
loggy("Error: {$e->getMessage()}\n");
|
||||
Log::error('Error seeding sentinel: '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue