mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-29 15:28:48 +00:00
refactor: Replace unused context parameters with blank identifiers and fix variable references
- Replace ctx parameter with _ in provisionTenantContext, provisionDatabaseSchema, provisionStorageResources, configureCarrier, configureRatePlans, setupPaymentProcessing, and validateCompliance methods - Fix tenant_id scope to use wrappedTx.tenantID instead of r.tenantID in TenantScopedTransaction - Fix pricing effectiveness analytics to use ratePlanAnalytics.AverageDiscount and ratePlanAnalytics.TotalSavings instead of analytics.
This commit is contained in:
@@ -154,18 +154,3 @@ func (m *SMDPManager) updateCarrierMetrics(carrierID string, success bool, respo
|
||||
|
||||
carrier.Metrics.RequestRate = float64(carrier.Metrics.TotalRequests) / time.Since(time.Now().Add(-time.Minute)).Seconds()
|
||||
}
|
||||
|
||||
func (m *SMDPManager) getHighestPriorityCarrier(carriers []*Carrier) *Carrier {
|
||||
if len(carriers) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
highestPriority := carriers[0]
|
||||
for _, carrier := range carriers {
|
||||
if carrier.Priority > highestPriority.Priority {
|
||||
highestPriority = carrier
|
||||
}
|
||||
}
|
||||
|
||||
return highestPriority
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user