this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

parallel worker: variable typo, and add a docs line (#1019)

authored by

bnewbold and committed by
GitHub
9a68b5f7 498ae718

+6 -4
+6 -4
events/schedulers/parallel/parallel.go
··· 11 11 "github.com/prometheus/client_golang/prometheus" 12 12 ) 13 13 14 - // Scheduler is a parallel scheduler that will run work on a fixed number of workers 14 + // Scheduler is a parallel scheduler that will run work on a fixed number of workers. 15 + // 16 + // Notably, this scheduler uses a per-DID task tracker to ensure that events are not processed concurrently for the same account. This does *not* mean that all events for the same DID are consistently processed by the same worker. 15 17 type Scheduler struct { 16 18 maxConcurrency int 17 19 maxQueue int ··· 30 32 itemsAdded prometheus.Counter 31 33 itemsProcessed prometheus.Counter 32 34 itemsActive prometheus.Counter 33 - workesActive prometheus.Gauge 35 + workersActive prometheus.Gauge 34 36 35 37 log *slog.Logger 36 38 } ··· 51 53 itemsAdded: schedulers.WorkItemsAdded.WithLabelValues(ident, "parallel"), 52 54 itemsProcessed: schedulers.WorkItemsProcessed.WithLabelValues(ident, "parallel"), 53 55 itemsActive: schedulers.WorkItemsActive.WithLabelValues(ident, "parallel"), 54 - workesActive: schedulers.WorkersActive.WithLabelValues(ident, "parallel"), 56 + workersActive: schedulers.WorkersActive.WithLabelValues(ident, "parallel"), 55 57 56 58 log: slog.Default().With("system", "parallel-scheduler"), 57 59 } ··· 60 62 go p.worker() 61 63 } 62 64 63 - p.workesActive.Set(float64(maxC)) 65 + p.workersActive.Set(float64(maxC)) 64 66 65 67 return p 66 68 }