Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import { parse } from '@aws-sdk/util-arn-parser'
import { isAwsError, ToolkitError } from '../../shared/errors'
import { telemetry } from '../../shared/telemetry/telemetry'
import { localize } from '../../shared/utilities/vsCodeUtils'
import { sleep } from '../../shared/utilities/timeoutUtils'
import { randomInt } from 'crypto'

// TODO: is there a better way to manage all endpoint strings in one place?
export const defaultServiceConfig: CodeWhispererConfig = {
Expand Down Expand Up @@ -116,6 +118,7 @@ export class RegionProfileManager {
return []
}
const availableProfiles: RegionProfile[] = []
await sleep(randomInt(0, 6000))
for (const [region, endpoint] of endpoints.entries()) {
const client = await this._createQClient(region, endpoint, conn as SsoConnection)
const requester = async (request: CodeWhispererUserClient.ListAvailableProfilesRequest) =>
Expand Down
Loading