autopilot: continue threading context

Remove one context.TODO and add one more.
This commit is contained in:
Elle Mouton
2025-04-09 06:31:05 +02:00
parent 13fcb08794
commit 1c6c6436af
5 changed files with 17 additions and 7 deletions

View File

@@ -169,8 +169,8 @@ func betweennessCentrality(g *SimpleGraph, s int, centrality []float64) {
}
// Refresh recalculates and stores centrality values.
func (bc *BetweennessCentrality) Refresh(graph ChannelGraph) error {
ctx := context.TODO()
func (bc *BetweennessCentrality) Refresh(ctx context.Context,
graph ChannelGraph) error {
cache, err := NewSimpleGraph(ctx, graph)
if err != nil {