Remove all ray() calls
This commit is contained in:
@@ -208,7 +208,6 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$this->container_name = "{$this->application->settings->custom_internal_name}-pr-{$this->pull_request_id}";
|
||||
}
|
||||
}
|
||||
ray('New container name: ', $this->container_name)->green();
|
||||
|
||||
$this->saved_outputs = collect();
|
||||
|
||||
@@ -298,7 +297,6 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
if ($this->pull_request_id !== 0 && $this->application->is_github_based()) {
|
||||
ApplicationPullRequestUpdateJob::dispatch(application: $this->application, preview: $this->preview, deployment_uuid: $this->deployment_uuid, status: ProcessStatus::ERROR);
|
||||
}
|
||||
ray($e);
|
||||
$this->fail($e);
|
||||
throw $e;
|
||||
} finally {
|
||||
@@ -389,7 +387,6 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
} else {
|
||||
$this->dockerImageTag = $this->application->docker_registry_image_tag;
|
||||
}
|
||||
ray("echo 'Starting deployment of {$this->dockerImage}:{$this->dockerImageTag} to {$this->server->name}.'");
|
||||
$this->application_deployment_queue->addLogEntry("Starting deployment of {$this->dockerImage}:{$this->dockerImageTag} to {$this->server->name}.");
|
||||
$this->generate_image_names();
|
||||
$this->prepare_builder_image();
|
||||
@@ -712,38 +709,26 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
{
|
||||
$forceFail = true;
|
||||
if (str($this->application->docker_registry_image_name)->isEmpty()) {
|
||||
ray('empty docker_registry_image_name');
|
||||
|
||||
return;
|
||||
}
|
||||
if ($this->restart_only) {
|
||||
ray('restart_only');
|
||||
|
||||
return;
|
||||
}
|
||||
if ($this->application->build_pack === 'dockerimage') {
|
||||
ray('dockerimage');
|
||||
|
||||
return;
|
||||
}
|
||||
if ($this->use_build_server) {
|
||||
ray('use_build_server');
|
||||
$forceFail = true;
|
||||
}
|
||||
if ($this->server->isSwarm() && $this->build_pack !== 'dockerimage') {
|
||||
ray('isSwarm');
|
||||
$forceFail = true;
|
||||
}
|
||||
if ($this->application->additional_servers->count() > 0) {
|
||||
ray('additional_servers');
|
||||
$forceFail = true;
|
||||
}
|
||||
if ($this->is_this_additional_server) {
|
||||
ray('this is an additional_servers, no pushy pushy');
|
||||
|
||||
return;
|
||||
}
|
||||
ray('push_to_docker_registry noww: '.$this->production_image_name);
|
||||
try {
|
||||
instant_remote_process(["docker images --format '{{json .}}' {$this->production_image_name}"], $this->server);
|
||||
$this->application_deployment_queue->addLogEntry('----------------------------------------');
|
||||
@@ -775,7 +760,6 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
if ($forceFail) {
|
||||
throw new RuntimeException($e->getMessage(), 69420);
|
||||
}
|
||||
ray($e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1386,8 +1370,6 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
return;
|
||||
}
|
||||
if ($destination_ids->contains($this->destination->id)) {
|
||||
ray('Same destination found in additional destinations. Skipping.');
|
||||
|
||||
return;
|
||||
}
|
||||
foreach ($destination_ids as $destination_id) {
|
||||
@@ -2449,7 +2431,6 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");
|
||||
|
||||
if ($this->application->build_pack !== 'dockercompose') {
|
||||
$code = $exception->getCode();
|
||||
ray($code);
|
||||
if ($code !== 69420) {
|
||||
// 69420 means failed to push the image to the registry, so we don't need to remove the new version as it is the currently running one
|
||||
if ($this->application->settings->is_consistent_container_name_enabled || str($this->application->settings->custom_internal_name)->isNotEmpty()) {
|
||||
|
||||
@@ -31,8 +31,6 @@ class ApplicationPullRequestUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
{
|
||||
try {
|
||||
if ($this->application->is_public_repository()) {
|
||||
ray('Public repository. Skipping comment update.');
|
||||
|
||||
return;
|
||||
}
|
||||
if ($this->status === ProcessStatus::CLOSED) {
|
||||
@@ -53,16 +51,12 @@ class ApplicationPullRequestUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
|
||||
$this->body .= '[Open Build Logs]('.$this->build_logs_url.")\n\n\n";
|
||||
$this->body .= 'Last updated at: '.now()->toDateTimeString().' CET';
|
||||
|
||||
ray('Updating comment', $this->body);
|
||||
if ($this->preview->pull_request_issue_comment_id) {
|
||||
$this->update_comment();
|
||||
} else {
|
||||
$this->create_comment();
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
ray($e);
|
||||
|
||||
return $e;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +67,6 @@ class ApplicationPullRequestUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
'body' => $this->body,
|
||||
], throwError: false);
|
||||
if (data_get($data, 'message') === 'Not Found') {
|
||||
ray('Comment not found. Creating new one.');
|
||||
$this->create_comment();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ class CheckResaleLicenseJob implements ShouldBeEncrypted, ShouldQueue
|
||||
CheckResaleLicense::run();
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('CheckResaleLicenseJob failed with: '.$e->getMessage());
|
||||
ray($e);
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,18 +20,15 @@ class CleanupHelperContainersJob implements ShouldBeEncrypted, ShouldBeUnique, S
|
||||
public function handle(): void
|
||||
{
|
||||
try {
|
||||
ray('Cleaning up helper containers on '.$this->server->name);
|
||||
$containers = instant_remote_process(['docker container ps --format \'{{json .}}\' | jq -s \'map(select(.Image | contains("ghcr.io/coollabsio/coolify-helper")))\''], $this->server, false);
|
||||
$containerIds = collect(json_decode($containers))->pluck('ID');
|
||||
if ($containerIds->count() > 0) {
|
||||
foreach ($containerIds as $containerId) {
|
||||
ray('Removing container '.$containerId);
|
||||
instant_remote_process(['docker container rm -f '.$containerId], $this->server, false);
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('CleanupHelperContainersJob failed with error: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,13 +29,11 @@ class CleanupInstanceStuffsJob implements ShouldBeEncrypted, ShouldBeUnique, Sho
|
||||
// $this->cleanup_waitlist();
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('CleanupInstanceStuffsJob failed with error: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
}
|
||||
try {
|
||||
$this->cleanup_invitation_link();
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('CleanupInstanceStuffsJob failed with error: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,8 +92,6 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
|
||||
|
||||
$status = str(data_get($this->database, 'status'));
|
||||
if (! $status->startsWith('running') && $this->database->id !== 0) {
|
||||
ray('database not running');
|
||||
|
||||
return;
|
||||
}
|
||||
if (data_get($this->backup, 'database_type') === 'App\Models\ServiceDatabase') {
|
||||
@@ -222,7 +220,6 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
|
||||
// Format: db1:collection1,collection2|db2:collection3,collection4
|
||||
$databasesToBackup = explode('|', $databasesToBackup);
|
||||
$databasesToBackup = array_map('trim', $databasesToBackup);
|
||||
ray($databasesToBackup);
|
||||
} elseif (str($databaseType)->contains('mysql')) {
|
||||
// Format: db1,db2,db3
|
||||
$databasesToBackup = explode(',', $databasesToBackup);
|
||||
@@ -244,7 +241,6 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
|
||||
}
|
||||
foreach ($databasesToBackup as $database) {
|
||||
$size = 0;
|
||||
ray('Backing up '.$database);
|
||||
try {
|
||||
if (str($databaseType)->contains('postgres')) {
|
||||
$this->backup_file = "/pg-dump-$database-".Carbon::now()->timestamp.'.dmp';
|
||||
@@ -377,10 +373,8 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
|
||||
if ($this->backup_output === '') {
|
||||
$this->backup_output = null;
|
||||
}
|
||||
ray('Backup done for '.$this->container_name.' at '.$this->server->name.':'.$this->backup_location);
|
||||
} catch (\Throwable $e) {
|
||||
$this->add_to_backup_output($e->getMessage());
|
||||
ray('Backup failed for '.$this->container_name.' at '.$this->server->name.':'.$this->backup_location.'\n\nError:'.$e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
@@ -400,16 +394,13 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
|
||||
}
|
||||
|
||||
$commands[] = $backupCommand;
|
||||
ray($commands);
|
||||
$this->backup_output = instant_remote_process($commands, $this->server);
|
||||
$this->backup_output = trim($this->backup_output);
|
||||
if ($this->backup_output === '') {
|
||||
$this->backup_output = null;
|
||||
}
|
||||
ray('Backup done for '.$this->container_name.' at '.$this->server->name.':'.$this->backup_location);
|
||||
} catch (\Throwable $e) {
|
||||
$this->add_to_backup_output($e->getMessage());
|
||||
ray('Backup failed for '.$this->container_name.' at '.$this->server->name.':'.$this->backup_location.'\n\nError:'.$e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
@@ -428,10 +419,8 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
|
||||
if ($this->backup_output === '') {
|
||||
$this->backup_output = null;
|
||||
}
|
||||
ray('Backup done for '.$this->container_name.' at '.$this->server->name.':'.$this->backup_location);
|
||||
} catch (\Throwable $e) {
|
||||
$this->add_to_backup_output($e->getMessage());
|
||||
ray('Backup failed for '.$this->container_name.' at '.$this->server->name.':'.$this->backup_location.'\n\nError:'.$e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
@@ -445,16 +434,13 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue
|
||||
} else {
|
||||
$commands[] = "docker exec $this->container_name mariadb-dump -u root -p{$this->database->mariadb_root_password} $database > $this->backup_location";
|
||||
}
|
||||
ray($commands);
|
||||
$this->backup_output = instant_remote_process($commands, $this->server);
|
||||
$this->backup_output = trim($this->backup_output);
|
||||
if ($this->backup_output === '') {
|
||||
$this->backup_output = null;
|
||||
}
|
||||
ray('Backup done for '.$this->container_name.' at '.$this->server->name.':'.$this->backup_location);
|
||||
} catch (\Throwable $e) {
|
||||
$this->add_to_backup_output($e->getMessage());
|
||||
ray('Backup failed for '.$this->container_name.' at '.$this->server->name.':'.$this->backup_location.'\n\nError:'.$e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ class GithubAppPermissionJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('GithubAppPermissionJob failed with: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ class PullTemplatesFromCDN implements ShouldBeEncrypted, ShouldQueue
|
||||
if (isDev() || isCloud()) {
|
||||
return;
|
||||
}
|
||||
ray('PullTemplatesAndVersions service-templates');
|
||||
$response = Http::retry(3, 1000)->get(config('constants.services.official'));
|
||||
if ($response->successful()) {
|
||||
$services = $response->json();
|
||||
@@ -35,7 +34,6 @@ class PullTemplatesFromCDN implements ShouldBeEncrypted, ShouldQueue
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('PullTemplatesAndVersions failed with: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ class PullVersionsFromCDN implements ShouldBeEncrypted, ShouldQueue
|
||||
{
|
||||
try {
|
||||
if (! isDev() && ! isCloud()) {
|
||||
ray('PullTemplatesAndVersions versions.json');
|
||||
$response = Http::retry(3, 1000)->get('https://cdn.coollabs.io/coolify/versions.json');
|
||||
if ($response->successful()) {
|
||||
$versions = $response->json();
|
||||
|
||||
@@ -129,8 +129,6 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
});
|
||||
});
|
||||
|
||||
ray('allServiceApplicationIds', ['allServiceApplicationIds' => $this->allServiceApplicationIds]);
|
||||
|
||||
foreach ($this->containers as $container) {
|
||||
$containerStatus = data_get($container, 'state', 'exited');
|
||||
$containerHealth = data_get($container, 'health_status', 'unhealthy');
|
||||
@@ -158,7 +156,6 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$this->updateApplicationPreviewStatus($applicationId, $containerStatus);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
ray()->error($e);
|
||||
}
|
||||
} elseif ($labels->has('coolify.serviceId')) {
|
||||
$serviceId = $labels->get('coolify.serviceId');
|
||||
@@ -178,7 +175,6 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
if ($name === 'coolify-proxy' && $this->isRunning($containerStatus)) {
|
||||
$this->foundProxy = true;
|
||||
} elseif ($type === 'service' && $this->isRunning($containerStatus)) {
|
||||
ray("Service: $uuid, $containerStatus");
|
||||
} else {
|
||||
if ($this->allDatabaseUuids->contains($uuid) && $this->isRunning($containerStatus)) {
|
||||
$this->foundDatabaseUuids->push($uuid);
|
||||
@@ -218,7 +214,6 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
}
|
||||
$application->status = $containerStatus;
|
||||
$application->save();
|
||||
ray('Application updated', ['application_id' => $applicationId, 'status' => $containerStatus]);
|
||||
}
|
||||
|
||||
private function updateApplicationPreviewStatus(string $applicationId, string $containerStatus)
|
||||
@@ -229,21 +224,17 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
}
|
||||
$application->status = $containerStatus;
|
||||
$application->save();
|
||||
ray('Application preview updated', ['application_id' => $applicationId, 'status' => $containerStatus]);
|
||||
}
|
||||
|
||||
private function updateNotFoundApplicationStatus()
|
||||
{
|
||||
$notFoundApplicationIds = $this->allApplicationIds->diff($this->foundApplicationIds);
|
||||
if ($notFoundApplicationIds->isNotEmpty()) {
|
||||
ray('Not found application ids', ['application_ids' => $notFoundApplicationIds]);
|
||||
$notFoundApplicationIds->each(function ($applicationId) {
|
||||
ray('Updating application status', ['application_id' => $applicationId, 'status' => 'exited']);
|
||||
$application = Application::find($applicationId);
|
||||
if ($application) {
|
||||
$application->status = 'exited';
|
||||
$application->save();
|
||||
ray('Application status updated', ['application_id' => $applicationId, 'status' => 'exited']);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -253,14 +244,11 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
{
|
||||
$notFoundApplicationPreviewsIds = $this->allApplicationPreviewsIds->diff($this->foundApplicationPreviewsIds);
|
||||
if ($notFoundApplicationPreviewsIds->isNotEmpty()) {
|
||||
ray('Not found application previews ids', ['application_previews_ids' => $notFoundApplicationPreviewsIds]);
|
||||
$notFoundApplicationPreviewsIds->each(function ($applicationPreviewId) {
|
||||
ray('Updating application preview status', ['application_preview_id' => $applicationPreviewId, 'status' => 'exited']);
|
||||
$applicationPreview = ApplicationPreview::find($applicationPreviewId);
|
||||
if ($applicationPreview) {
|
||||
$applicationPreview->status = 'exited';
|
||||
$applicationPreview->save();
|
||||
ray('Application preview status updated', ['application_preview_id' => $applicationPreviewId, 'status' => 'exited']);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -294,17 +282,14 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
}
|
||||
$database->status = $containerStatus;
|
||||
$database->save();
|
||||
ray('Database status updated', ['database_uuid' => $databaseUuid, 'status' => $containerStatus]);
|
||||
if ($this->isRunning($containerStatus) && $tcpProxy) {
|
||||
$tcpProxyContainerFound = $this->containers->filter(function ($value, $key) use ($databaseUuid) {
|
||||
return data_get($value, 'name') === "$databaseUuid-proxy" && data_get($value, 'state') === 'running';
|
||||
})->first();
|
||||
if (! $tcpProxyContainerFound) {
|
||||
ray('Starting TCP proxy for database', ['database_uuid' => $databaseUuid]);
|
||||
StartDatabaseProxy::dispatch($database);
|
||||
$this->server->team?->notify(new ContainerRestarted("TCP Proxy for {$database->name}", $this->server));
|
||||
} else {
|
||||
ray('TCP proxy for database found in containers', ['database_uuid' => $databaseUuid]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -313,17 +298,12 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
{
|
||||
$notFoundDatabaseUuids = $this->allDatabaseUuids->diff($this->foundDatabaseUuids);
|
||||
if ($notFoundDatabaseUuids->isNotEmpty()) {
|
||||
ray('Not found database uuids', ['database_uuids' => $notFoundDatabaseUuids]);
|
||||
$notFoundDatabaseUuids->each(function ($databaseUuid) {
|
||||
ray('Updating database status', ['database_uuid' => $databaseUuid, 'status' => 'exited']);
|
||||
$database = $this->databases->where('uuid', $databaseUuid)->first();
|
||||
if ($database) {
|
||||
$database->status = 'exited';
|
||||
$database->save();
|
||||
ray('Database status updated', ['database_uuid' => $databaseUuid, 'status' => 'exited']);
|
||||
ray('Database is public', ['database_uuid' => $databaseUuid, 'is_public' => $database->is_public]);
|
||||
if ($database->is_public) {
|
||||
ray('Stopping TCP proxy for database', ['database_uuid' => $databaseUuid]);
|
||||
StopDatabaseProxy::dispatch($database);
|
||||
}
|
||||
}
|
||||
@@ -341,14 +321,11 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$application = $service->applications()->where('id', $subId)->first();
|
||||
$application->status = $containerStatus;
|
||||
$application->save();
|
||||
ray('Service application updated', ['service_id' => $serviceId, 'sub_type' => $subType, 'sub_id' => $subId, 'status' => $containerStatus]);
|
||||
} elseif ($subType === 'database') {
|
||||
$database = $service->databases()->where('id', $subId)->first();
|
||||
$database->status = $containerStatus;
|
||||
$database->save();
|
||||
ray('Service database updated', ['service_id' => $serviceId, 'sub_type' => $subType, 'sub_id' => $subId, 'status' => $containerStatus]);
|
||||
} else {
|
||||
ray()->warning('Unknown sub type', ['service_id' => $serviceId, 'sub_type' => $subType, 'sub_id' => $subId, 'status' => $containerStatus]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,26 +334,20 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$notFoundServiceApplicationIds = $this->allServiceApplicationIds->diff($this->foundServiceApplicationIds);
|
||||
$notFoundServiceDatabaseIds = $this->allServiceDatabaseIds->diff($this->foundServiceDatabaseIds);
|
||||
if ($notFoundServiceApplicationIds->isNotEmpty()) {
|
||||
ray('Not found service application ids', ['service_application_ids' => $notFoundServiceApplicationIds]);
|
||||
$notFoundServiceApplicationIds->each(function ($serviceApplicationId) {
|
||||
ray('Updating service application status', ['service_application_id' => $serviceApplicationId, 'status' => 'exited']);
|
||||
$application = ServiceApplication::find($serviceApplicationId);
|
||||
if ($application) {
|
||||
$application->status = 'exited';
|
||||
$application->save();
|
||||
ray('Service application status updated', ['service_application_id' => $serviceApplicationId, 'status' => 'exited']);
|
||||
}
|
||||
});
|
||||
}
|
||||
if ($notFoundServiceDatabaseIds->isNotEmpty()) {
|
||||
ray('Not found service database ids', ['service_database_ids' => $notFoundServiceDatabaseIds]);
|
||||
$notFoundServiceDatabaseIds->each(function ($serviceDatabaseId) {
|
||||
ray('Updating service database status', ['service_database_id' => $serviceDatabaseId, 'status' => 'exited']);
|
||||
$database = ServiceDatabase::find($serviceDatabaseId);
|
||||
if ($database) {
|
||||
$database->status = 'exited';
|
||||
$database->save();
|
||||
ray('Service database status updated', ['service_database_id' => $serviceDatabaseId, 'status' => 'exited']);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -385,7 +356,6 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
private function updateAdditionalServersStatus()
|
||||
{
|
||||
$this->allApplicationsWithAdditionalServers->each(function ($application) {
|
||||
ray('Updating additional servers status for application', ['application_id' => $application->id]);
|
||||
ComplexStatusCheck::run($application);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ class SendConfirmationForWaitlistJob implements ShouldBeEncrypted, ShouldQueue
|
||||
send_user_an_email($mail, $this->email);
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification("SendConfirmationForWaitlistJob failed for {$this->email} with error: ".$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,6 @@ class ServerCheckJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$this->server->team?->notify(new ContainerRestarted('coolify-proxy', $this->server));
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
ray($e);
|
||||
}
|
||||
} else {
|
||||
$this->server->proxy->status = data_get($foundProxyContainer, 'State.Status');
|
||||
@@ -97,8 +96,6 @@ class ServerCheckJob implements ShouldBeEncrypted, ShouldQueue
|
||||
}
|
||||
|
||||
} catch (\Throwable $e) {
|
||||
ray($e->getMessage());
|
||||
|
||||
return handleError($e);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +32,7 @@ class ServerLimitCheckJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$servers_count = $servers->count();
|
||||
$limit = data_get($this->team->limits, 'serverLimit', 2);
|
||||
$number_of_servers_to_disable = $servers_count - $limit;
|
||||
ray('ServerLimitCheckJob', $this->team->uuid, $servers_count, $limit, $number_of_servers_to_disable);
|
||||
if ($number_of_servers_to_disable > 0) {
|
||||
ray('Disabling servers');
|
||||
$servers = $servers->sortbyDesc('created_at');
|
||||
$servers_to_disable = $servers->take($number_of_servers_to_disable);
|
||||
$servers_to_disable->each(function ($server) {
|
||||
@@ -51,7 +49,6 @@ class ServerLimitCheckJob implements ShouldBeEncrypted, ShouldQueue
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('ServerLimitCheckJob failed with: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
|
||||
return handleError($e);
|
||||
}
|
||||
|
||||
@@ -27,14 +27,12 @@ class SubscriptionInvoiceFailedJob implements ShouldBeEncrypted, ShouldQueue
|
||||
]);
|
||||
$mail->subject('Your last payment was failed for Coolify Cloud.');
|
||||
$this->team->members()->each(function ($member) use ($mail) {
|
||||
ray($member);
|
||||
if ($member->isAdmin()) {
|
||||
send_user_an_email($mail, $member->email);
|
||||
}
|
||||
});
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('SubscriptionInvoiceFailedJob failed with: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,14 +30,12 @@ class SubscriptionTrialEndedJob implements ShouldBeEncrypted, ShouldQueue
|
||||
]);
|
||||
$this->team->members()->each(function ($member) use ($mail) {
|
||||
if ($member->isAdmin()) {
|
||||
ray('Sending trial ended email to '.$member->email);
|
||||
send_user_an_email($mail, $member->email);
|
||||
send_internal_notification('Trial reminder email sent to '.$member->email);
|
||||
}
|
||||
});
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('SubscriptionTrialEndsSoonJob failed with: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,14 +30,12 @@ class SubscriptionTrialEndsSoonJob implements ShouldBeEncrypted, ShouldQueue
|
||||
]);
|
||||
$this->team->members()->each(function ($member) use ($mail) {
|
||||
if ($member->isAdmin()) {
|
||||
ray('Sending trial ending email to '.$member->email);
|
||||
send_user_an_email($mail, $member->email);
|
||||
send_internal_notification('Trial reminder email sent to '.$member->email);
|
||||
}
|
||||
});
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('SubscriptionTrialEndsSoonJob failed with: '.$e->getMessage());
|
||||
ray($e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user