mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-16 16:15:36 +00:00
fix(proxy): defer UI refresh until Traefik version check completes (#7783)
This commit is contained in:
1 file changed
+11
-1
@@ -29,7 +29,8 @@ class ProxyStatusChangedNotification implements ShouldQueueAfterCommit
|
|||||||
$server->proxy->set('status', $status);
|
$server->proxy->set('status', $status);
|
||||||
$server->save();
|
$server->save();
|
||||||
|
|
||||||
ProxyStatusChangedUI::dispatch($server->team_id);
|
$versionCheckDispatched = false;
|
||||||
|
|
||||||
if ($status === 'running') {
|
if ($status === 'running') {
|
||||||
$server->setupDefaultRedirect();
|
$server->setupDefaultRedirect();
|
||||||
$server->setupDynamicProxyConfiguration();
|
$server->setupDynamicProxyConfiguration();
|
||||||
@@ -40,7 +41,9 @@ class ProxyStatusChangedNotification implements ShouldQueueAfterCommit
|
|||||||
if ($server->proxyType() === ProxyTypes::TRAEFIK->value) {
|
if ($server->proxyType() === ProxyTypes::TRAEFIK->value) {
|
||||||
$traefikVersions = get_traefik_versions();
|
$traefikVersions = get_traefik_versions();
|
||||||
if ($traefikVersions !== null) {
|
if ($traefikVersions !== null) {
|
||||||
|
// Version check job will dispatch ProxyStatusChangedUI when complete
|
||||||
CheckTraefikVersionForServerJob::dispatch($server, $traefikVersions);
|
CheckTraefikVersionForServerJob::dispatch($server, $traefikVersions);
|
||||||
|
$versionCheckDispatched = true;
|
||||||
} else {
|
} else {
|
||||||
Log::warning('Traefik version check skipped after proxy status change: versions.json data unavailable', [
|
Log::warning('Traefik version check skipped after proxy status change: versions.json data unavailable', [
|
||||||
'server_id' => $server->id,
|
'server_id' => $server->id,
|
||||||
@@ -49,6 +52,13 @@ class ProxyStatusChangedNotification implements ShouldQueueAfterCommit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only dispatch UI refresh if version check wasn't dispatched
|
||||||
|
// (version check job handles its own UI refresh with updated version data)
|
||||||
|
if (! $versionCheckDispatched) {
|
||||||
|
ProxyStatusChangedUI::dispatch($server->team_id);
|
||||||
|
}
|
||||||
|
|
||||||
if ($status === 'created') {
|
if ($status === 'created') {
|
||||||
instant_remote_process([
|
instant_remote_process([
|
||||||
'docker rm -f coolify-proxy',
|
'docker rm -f coolify-proxy',
|
||||||
|
|||||||
Reference in new issue
Block a user