MCPcopy Create free account
hub / github.com/cortexproject/cortex / createUserRequestQueue

Method createUserRequestQueue

pkg/scheduler/queue/user_queues.go:210–218  ·  view source on GitHub ↗
(userID string)

Source from the content-addressed store, hash-verified

208}
209
210func (q *queues) createUserRequestQueue(userID string) userRequestQueue {
211 if q.limits.QueryPriority(userID).Enabled {
212 return NewPriorityRequestQueue(util.NewPriorityQueue(nil), userID, q.queueLength)
213 }
214
215 queueSize := q.limits.MaxOutstandingPerTenant(userID)
216
217 return NewFIFORequestQueue(make(chan Request, queueSize), userID, q.queueLength)
218}
219
220// Finds next queue for the querier. To support fair scheduling between users, client is expected
221// to pass last user index returned by this function as argument. Is there was no previous

Callers 1

getOrAddQueueMethod · 0.95

Calls 5

NewPriorityQueueFunction · 0.92
NewPriorityRequestQueueFunction · 0.85
NewFIFORequestQueueFunction · 0.85
QueryPriorityMethod · 0.65

Tested by

no test coverage detected