Files
coolify/app/Events/ApplicationStopFailed.php
T
Andras BacsaiandClaude Opus 5.5 e49e540ec0 fix(applications): report a failed stop instead of failing silently
- Do not ignore errors of the docker stop and rm commands, so a failed SSH call
  does not mark a running application as exited.
- Log the failure and broadcast ApplicationStopFailed; the application page
  shows an error toast.

Closes #11063

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 00:45:13 +02:00

28 lines
666 B
PHP

<?php
namespace App\Events;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
/**
* Tells the application page that a queued stop did not stop the application.
*/
class ApplicationStopFailed implements ShouldBroadcastNow
{
use Dispatchable, SerializesModels;
public function __construct(
public int $teamId,
public string $applicationUuid,
public string $message,
) {}
public function broadcastOn(): array
{
return [new PrivateChannel("team.{$this->teamId}")];
}
}