Skip to content

Commit

Permalink
Change phase to WaitingForResources when quota exceeded
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Apr 7, 2024
1 parent c8be3e4 commit 053942b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ func (a tokenAllocator) allocateToken(ctx context.Context, p webapi.AsyncPlugin,
return &State{
AllocationTokenRequestStartTime: startTime,
Phase: PhaseNotStarted,
}, core.PhaseInfoQueued(
a.clock.Now(), 0, "Quota for task has exceeded. The request is enqueued."), nil
}, core.PhaseInfoWaitingForResourcesInfo(
a.clock.Now(), 0, "Quota for task has exceeded. Waiting for the resource.", nil), nil
}

return nil, core.PhaseInfo{}, fmt.Errorf("allocation status undefined [%v]", allocationStatus)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var (

// Configs for Resource Manager
type Config struct {
Type Type `json:"type" pflag:"noop,Which resource manager to use"`
Type Type `json:"type" pflag:"noop, Which resource manager to use, redis or noop. Default is noop."`
ResourceMaxQuota int `json:"resourceMaxQuota" pflag:",Global limit for concurrent Qubole queries"`
RedisConfig RedisConfig `json:"redis" pflag:",Config for Redis resourcemanager."`
}
Expand Down

0 comments on commit 053942b

Please sign in to comment.