fix
This commit is contained in:
parent
6e9960c010
commit
ca2c66943c
2 changed files with 8 additions and 8 deletions
|
|
@ -35,10 +35,7 @@ public function handle()
|
|||
}
|
||||
|
||||
$this->servers = Server::all();
|
||||
if (isCloud()) {
|
||||
echo "Running in cloud mode\n";
|
||||
} else {
|
||||
echo "Running in self-hosted mode\n";
|
||||
if (! isCloud()) {
|
||||
$this->send_alive_signal();
|
||||
get_public_ips();
|
||||
}
|
||||
|
|
@ -64,7 +61,7 @@ public function handle()
|
|||
try {
|
||||
$this->pullHelperImage();
|
||||
} catch (\Throwable $e) {
|
||||
echo "Error pulling helper image: {$e->getMessage()}\n";
|
||||
//
|
||||
}
|
||||
|
||||
if (isCloud()) {
|
||||
|
|
@ -125,7 +122,6 @@ private function update_user_emails()
|
|||
try {
|
||||
User::whereRaw('email ~ \'[A-Z]\'')->get()->each(function (User $user) {
|
||||
$user->update(['email' => strtolower($user->email)]);
|
||||
$user->update(['email' => strtolower($user->email)]);
|
||||
});
|
||||
} catch (\Throwable $e) {
|
||||
echo "Error in updating user emails: {$e->getMessage()}\n";
|
||||
|
|
@ -229,7 +225,6 @@ private function restore_coolify_db_backup()
|
|||
|
||||
private function send_alive_signal()
|
||||
{
|
||||
echo "Sending alive signal...\n";
|
||||
$id = config('app.id');
|
||||
$version = config('constants.coolify.version');
|
||||
$settings = instanceSettings();
|
||||
|
|
@ -255,7 +250,6 @@ private function cleanup_in_progress_application_deployments()
|
|||
}
|
||||
$queued_inprogress_deployments = ApplicationDeploymentQueue::whereIn('status', [ApplicationDeploymentStatus::IN_PROGRESS->value, ApplicationDeploymentStatus::QUEUED->value])->get();
|
||||
foreach ($queued_inprogress_deployments as $deployment) {
|
||||
echo "Marking deployment {$deployment->id} as failed\n";
|
||||
$deployment->status = ApplicationDeploymentStatus::FAILED->value;
|
||||
$deployment->save();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@ public function run(): void
|
|||
{
|
||||
$user = 'root';
|
||||
|
||||
if (isCloud()) {
|
||||
echo " Running in cloud mode.\n";
|
||||
} else {
|
||||
echo " Running in self-hosted mode.\n";
|
||||
}
|
||||
|
||||
if (User::find(0) !== null && Team::find(0) !== null) {
|
||||
if (DB::table('team_user')->where('user_id', 0)->first() === null) {
|
||||
DB::table('team_user')->insert([
|
||||
|
|
|
|||
Loading…
Reference in a new issue