mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 14:14:52 +00:00
fix: seeder should not start sentinel
This commit is contained in:
1 parent
a2b6a61c4a
commit
e7f2215652
2 files changed
+14
-6
No files matched your search
@@ -89,7 +89,7 @@ class ServerSetting extends Model
|
||||
});
|
||||
}
|
||||
|
||||
public function generateSentinelToken(bool $save = true)
|
||||
public function generateSentinelToken(bool $save = true, bool $shouldExecuteEvent = true)
|
||||
{
|
||||
$data = [
|
||||
'server_uuid' => $this->server->uuid,
|
||||
@@ -98,13 +98,17 @@ class ServerSetting extends Model
|
||||
$encrypted = encrypt($token);
|
||||
$this->sentinel_token = $encrypted;
|
||||
if ($save) {
|
||||
$this->save();
|
||||
if ($shouldExecuteEvent) {
|
||||
$this->saveQuietly();
|
||||
} else {
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
|
||||
return $token;
|
||||
}
|
||||
|
||||
public function generateSentinelUrl(bool $save = true)
|
||||
public function generateSentinelUrl(bool $save = true, bool $shouldExecuteEvent = true)
|
||||
{
|
||||
$domain = null;
|
||||
$settings = InstanceSettings::get();
|
||||
@@ -119,7 +123,11 @@ class ServerSetting extends Model
|
||||
}
|
||||
$this->sentinel_custom_url = $domain;
|
||||
if ($save) {
|
||||
$this->save();
|
||||
if ($shouldExecuteEvent) {
|
||||
$this->saveQuietly();
|
||||
} else {
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
|
||||
return $domain;
|
||||
|
||||
Reference in new issue
Block a user