Skip to content

Commit

Permalink
fix rollout command (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi authored Jan 9, 2024
1 parent cf847ee commit 89d9a2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/commands/query-rollout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ export default async () => {
const rollouts = await checkRollouts(domain)

console.group(`Current rollouts for domain "${domain}" for this request`)
console.table(rollouts.map)
console.table(rollouts.rolloutMap)
console.groupEnd()

const rolloutName = args["--rolloutName"]

if (rolloutName) {
console.group(`Raw data for rollout "${rolloutName}" for domain "${domain}"`)

const rollout = rollouts.rollout.records[rolloutName]
const rollout = rollouts.records[rolloutName]

// Simulate the distribution for 1000 sessions
let totalSessions = 1000.0
Expand Down
6 changes: 2 additions & 4 deletions src/helpers/rollouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ type Rollout = {
}

type Rollouts = {
map: Record<string, Rollout>
rollout: {
records: Record<string, [Rollout]>
}
rolloutMap: Record<string, Rollout>,
records: Record<string, [Rollout]>
}

/**
Expand Down

0 comments on commit 89d9a2c

Please sign in to comment.