fix: address code review findings
This commit is contained in:
@@ -343,7 +343,9 @@ func (g *Graph) FindRoute(originID, destID string, opts SearchOptions, closedSta
|
||||
}
|
||||
}
|
||||
}
|
||||
} // Build adjacency list from edges
|
||||
}
|
||||
|
||||
// Build adjacency list from edges
|
||||
adj := g.buildAdjacencyList()
|
||||
|
||||
// BFS with transfer tracking
|
||||
@@ -976,7 +978,7 @@ type HubStation struct {
|
||||
// rule from the transfer rules, or returns the default MCT.
|
||||
func getMCTForTransfer(optsMCT int, g *Graph) int {
|
||||
// Default MCT if no rules match
|
||||
defaultMCT := 1800 // 30 minutes
|
||||
defaultMCT := storage.DefaultMCT // 30 minutes
|
||||
|
||||
// If the user explicitly set an MCT via SearchOptions, prefer that
|
||||
if optsMCT > 0 {
|
||||
@@ -984,11 +986,10 @@ func getMCTForTransfer(optsMCT int, g *Graph) int {
|
||||
}
|
||||
|
||||
// Try to determine MCT from node types in the graph
|
||||
// This is a simplified lookup; in a full implementation, this would
|
||||
// query the transfer_rules table from the database
|
||||
// In a full implementation, this would query the transfer_rules table
|
||||
// from the database using storage.MinTransferTime(ruleKey, rules, defaultMCT)
|
||||
// For now, return the default MCT.
|
||||
|
||||
// For now, return the default MCT. In a full implementation,
|
||||
// this would query the transfer_rules table.
|
||||
return defaultMCT
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user