chore: fix workspace proxy flake (#8755)

This commit is contained in:
Colin Adler
2023-07-26 18:50:25 -05:00
committed by GitHub
parent 5cfa7082d1
commit 2811ab62d0

View File

@ -34,7 +34,7 @@ import (
// forceWorkspaceProxyHealthUpdate forces an update of the proxy health.
// This is useful when a proxy is created or deleted. Errors will be logged.
func (api *API) forceWorkspaceProxyHealthUpdate(ctx context.Context) {
if err := api.ProxyHealth.ForceUpdate(ctx); err != nil && !xerrors.Is(err, context.Canceled) {
if err := api.ProxyHealth.ForceUpdate(ctx); err != nil && !database.IsQueryCanceledError(err) && !xerrors.Is(err, context.Canceled) {
api.Logger.Error(ctx, "force proxy health update", slog.Error(err))
}
}