Skip to content

Commit

Permalink
WIP: Rollout decision added
Browse files Browse the repository at this point in the history
  • Loading branch information
muzahidul-opti committed Oct 30, 2024
1 parent 33c176e commit 58c5c61
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions Sources/Implementation/DefaultDecisionService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -254,18 +254,15 @@ class DefaultDecisionService: OPTDecisionService {
continue
}

if ignoreUPS {
decisionResponse = getVariationForFeatureRollout(config: config, featureFlag: featureFlag, user: user)

reasons.merge(decisionResponse.reasons)

if let decision = decisionResponse.result {
decisions.append(DecisionResponse(result: decision, reasons: reasons))
} else {
decisions.append(DecisionResponse(result: nil, reasons: reasons))
}
}
decisionResponse = getVariationForFeatureRollout(config: config, featureFlag: featureFlag, user: user)

reasons.merge(decisionResponse.reasons)

if let decision = decisionResponse.result {
decisions.append(DecisionResponse(result: decision, reasons: reasons))
} else {
decisions.append(DecisionResponse(result: nil, reasons: reasons))
}
}

// save profile
Expand Down

0 comments on commit 58c5c61

Please sign in to comment.