mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
fix(enterprise/coderd): make primary workspace proxy always be updatd now (#11499)
This commit is contained in:
@ -930,6 +930,7 @@ func convertRegion(proxy database.WorkspaceProxy, status proxyhealth.ProxyStatus
|
||||
}
|
||||
|
||||
func convertProxy(p database.WorkspaceProxy, status proxyhealth.ProxyStatus) codersdk.WorkspaceProxy {
|
||||
now := dbtime.Now()
|
||||
if p.IsPrimary() {
|
||||
// Primary is always healthy since the primary serves the api that this
|
||||
// is returned from.
|
||||
@ -939,8 +940,11 @@ func convertProxy(p database.WorkspaceProxy, status proxyhealth.ProxyStatus) cod
|
||||
ProxyHost: u.Host,
|
||||
Status: proxyhealth.Healthy,
|
||||
Report: codersdk.ProxyHealthReport{},
|
||||
CheckedAt: time.Now(),
|
||||
CheckedAt: now,
|
||||
}
|
||||
// For primary, created at / updated at are always 'now'
|
||||
p.CreatedAt = now
|
||||
p.UpdatedAt = now
|
||||
}
|
||||
if status.Status == "" {
|
||||
status.Status = proxyhealth.Unknown
|
||||
|
Reference in New Issue
Block a user