fix proxy check jo

This commit is contained in:
Andras Bacsai 2023-08-24 21:24:44 +02:00
parent 0076455e6e
commit 0a2d0da36f

View File

@ -22,7 +22,7 @@ class ProxyCheckJob implements ShouldQueue
{ {
try { try {
$container_name = 'coolify-proxy'; $container_name = 'coolify-proxy';
$servers = Server::isUsable()->whereNotNull('proxy')->get(); $servers = Server::all()->whereRelation('settings', 'is_reachable', true)->whereRelation('settings', 'is_usable', true)->whereNotNull('proxy')->get();
foreach ($servers as $server) { foreach ($servers as $server) {
$status = getContainerStatus(server: $server, container_id: $container_name); $status = getContainerStatus(server: $server, container_id: $container_name);
if ($status === 'running') { if ($status === 'running') {