mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 06:17:36 +00:00
fix(team): mark servers unreachable when subscription ends
Set unreachable_count to 3 and unreachable_notification_sent to true on all team servers in subscriptionEnded(), so the existing cleanup command can pick them up after the 7-day grace period. Also adds feature tests for the subscription-ended cleanup flow and casts server IP to string in existing unreachable server tests to fix type comparison.
This commit is contained in:
1 parent
a5b3d3a536
commit
3a8f52ce16
3 files changed
+84
-4
No files matched your search
+3
-1
@@ -233,6 +233,9 @@ class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, Sen
|
||||
'is_reachable' => false,
|
||||
]);
|
||||
ServerReachabilityChanged::dispatch($server);
|
||||
$server->unreachable_count = 3;
|
||||
$server->unreachable_notification_sent = true;
|
||||
$server->save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,5 +347,4 @@ class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, Sen
|
||||
{
|
||||
return $this->hasOne(WebhookNotificationSettings::class);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user