mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-14 00:33:44 -04:00
- On cloud, RestartService and RestartServiceApplication now run on the deployments queue instead of high. - StartProxy and RestartProxyJob, and the remote processes they start, now run on the deployments queue. - Self-hosted still uses the high queue. - Tests cover the new routing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
754 B
PHP
30 lines
754 B
PHP
<?php
|
|
|
|
namespace App\Actions\Service;
|
|
|
|
use App\Models\ServiceApplication;
|
|
use App\Models\ServiceDatabase;
|
|
use Lorisleiva\Actions\Concerns\AsAction;
|
|
use Lorisleiva\Actions\Decorators\JobDecorator;
|
|
|
|
class RestartServiceApplication
|
|
{
|
|
use AsAction;
|
|
|
|
public function configureJob(JobDecorator $job): void
|
|
{
|
|
$job->onQueue(deployment_queue());
|
|
}
|
|
|
|
public function handle(ServiceApplication|ServiceDatabase $serviceApplication): void
|
|
{
|
|
$service = $serviceApplication->service;
|
|
$server = $service->destination->server;
|
|
$containerName = escapeshellarg($serviceApplication->name.'-'.$service->uuid);
|
|
|
|
instant_remote_process([
|
|
"docker restart {$containerName}",
|
|
], $server);
|
|
}
|
|
}
|