Skip to content

Commit

Permalink
[ws-manager] add policy key to tracing in StopWorkspace call
Browse files Browse the repository at this point in the history
  • Loading branch information
sagor999 authored and roboquat committed Sep 12, 2022
1 parent 7bfaadf commit d4fe26f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/ws-manager/pkg/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,8 +733,10 @@ func (m *Manager) StopWorkspace(ctx context.Context, req *api.StopWorkspaceReque

gracePeriod := stopWorkspaceNormallyGracePeriod
if req.Policy == api.StopWorkspacePolicy_IMMEDIATELY {
span.LogKV("policy", "immediately")
gracePeriod = stopWorkspaceImmediatelyGracePeriod
} else if req.Policy == api.StopWorkspacePolicy_ABORT {
span.LogKV("policy", "abort")
gracePeriod = stopWorkspaceImmediatelyGracePeriod
err = m.markWorkspace(ctx, req.Id, addMark(abortRequestAnnotation, util.BooleanTrueString))
if err != nil {
Expand Down

0 comments on commit d4fe26f

Please sign in to comment.