Remove unnecessary echo and add alive message

This commit is contained in:
Andras Bacsai 2023-11-15 10:37:02 +01:00
parent 0459b3a115
commit 6d49678842

View File

@ -35,14 +35,15 @@ public function handle()
}
private function alive()
{
echo "Sending alive request.\n";
$id = config('app.id');
$settings = InstanceSettings::get();
$do_not_track = data_get($settings, 'do_not_track');
if ($do_not_track == true) {
echo "Skipping alive as do_not_track is enabled\n";
return;
}
try {
echo "I am alive!\n";
Http::get("https://get.coollabs.io/coolify/v4/alive?appId=$id");
} catch (\Throwable $e) {
echo "Error in alive: {$e->getMessage()}\n";